WebCore/dom/SpaceSplitString, used primarily for element class names, is quite wasteful memory wise. We could get massive gains with some simple trickery..
Created attachment 120679 [details] Proposed patch
Comment on attachment 120679 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=120679&action=review > Source/WebCore/dom/SpaceSplitString.h:75 > + Vector<AtomicString>* m_vector; This Vector used to have an inline capacity of 8, which I remember being a speedup at one point.
I instrumented the Alexa top sites to find out how many substrings we normally find in the class attribute, here are the results (number of substrings: percentage of class attributes): 1: 64.20% 2: 25.64% 3: 6.15% 4: 2.28% 5: 0.95% 6: 0.35% 7: 0.21% 8: 0.13% 9: 0.06% 10: 0.08% 11: 0.03% 12: 0.01% Given this data, I think we can reduce the inline capacity down to 2 where we'd save good amounts of memory and still cover 90% of cases.
Created attachment 120705 [details] Proposed patch v2
Comment on attachment 120705 [details] Proposed patch v2 I like it.
Comment on attachment 120705 [details] Proposed patch v2 Attachment 120705 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/10993749 New failing tests: http/tests/inspector/resource-tree/resource-tree-document-url.html
Comment on attachment 120705 [details] Proposed patch v2 Clearing flags on attachment: 120705 Committed r103790: <http://trac.webkit.org/changeset/103790>
All reviewed patches have been landed. Closing bug.