perf improvement for macaddict.com (and others)

This commit is contained in:
rickg@netscape.com
1999-04-25 01:43:06 +00:00
parent 8a85a793c9
commit cc6c45d403
2 changed files with 8 additions and 2 deletions

View File

@@ -29,6 +29,7 @@
#include "nsHTMLTags.h"
#include "nsHTMLEntities.h"
#include "nsCRT.h"
#include "nsStr.h"
//#define GESS_MACHINE
#ifdef GESS_MACHINE
@@ -1589,7 +1590,9 @@ nsresult CSkippedContentToken::Consume(PRUnichar aChar,nsScanner& aScanner) {
temp+=aChar;
result=aScanner.ReadUntil(temp,kLessThan,PR_FALSE);
}
done=PRBool(kNotFound!=temp.RFind(mTextValue,PR_TRUE));
nsAutoString temp2;
temp.Right(temp2,mTextValue.Length());
done=PRBool(0==temp2.Compare(mTextValue.GetUnicode(),PR_TRUE,mTextValue.Length()));
}
int len=temp.Length();
temp.Truncate(len-mTextValue.Length());