mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
Bug 636655 - Back out bug 582852 because of the performance regression it caused in creating large textnodes (while it was supposed to improve the performance); r,a=bzbarsky
This commit is contained in:
parent
9626543cf1
commit
8b39b5256b
@ -202,18 +202,13 @@ nsTextFragment::SetTo(const PRUnichar* aBuffer, PRInt32 aLength)
|
||||
}
|
||||
}
|
||||
|
||||
// We don't attempt to detect if large text nodes can be stored compactly,
|
||||
// because that wastes too much time.
|
||||
const PRInt32 LARGE_STRING_THRESHOLD = 10240; // 10KB
|
||||
PRBool need2 = aLength >= LARGE_STRING_THRESHOLD;
|
||||
if (!need2) {
|
||||
// See if we need to store the data in ucs2 or not
|
||||
while (ucp < uend) {
|
||||
PRUnichar ch = *ucp++;
|
||||
if (ch >= 256) {
|
||||
need2 = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
// See if we need to store the data in ucs2 or not
|
||||
PRBool need2 = PR_FALSE;
|
||||
while (ucp < uend) {
|
||||
PRUnichar ch = *ucp++;
|
||||
if (ch >= 256) {
|
||||
need2 = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user