[Webkit-unassigned] [Bug 72404] Could save a lot of memory in CharacterData by not always storing a String

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 15 13:25:14 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=72404





--- Comment #1 from Darin Adler <darin at apple.com>  2011-11-15 13:25:14 PST ---
Neat ideas. I think yours are are:

1) Use AtomicString instead of String.

2) Use a count of U+0020 space characters instead of a string.

3) Use a count of HTML space characters instead of a string. Not clear on how this would work.

Some other ideas:

4) Store the text in the node itself instead of in a separate object, allocating at a larger size to do so. This requires refactoring string operations so they can work directly on text without having to allocate a String object. That’s something I’ve been thinking that refactoring is something we should do.

5) Keep the original text around and reference count it; have the strings created by the HTML parser use pointers and lengths pointing at a single large character buffer instead of allocating separate StringImpl objects for each.

I think (1) is the easiest to do correctly and should be tried to see what the performance cost would be.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list