[Webkit-unassigned] [Bug 72404] New: 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 12:25:55 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=72404
Summary: Could save a lot of memory in CharacterData by not
always storing a String
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: HTML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: ojan at chromium.org
CC: koivisto at iki.fi, simon.fraser at apple.com,
arv at chromium.org, eae at chromium.org
Below is the dump just of whitespace text nodes from the HTML spec (string followed by count of that string occurring). If we stored atomic strings in these cases, we'd save a lot of memory. There are also non-whitespace strings that are repeated many times in the spec (e.g. "Unique " is in >30k text nodes).
For a short whitespace string that conforms to the list of 5 valid space characters in http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character, we could even store it as a single unsigned. Looking at the HTML spec, this is actually by far the common case.
The HTML spec is a bit unique in it's content, but it's certainly a common pattern for sites to have repeated whitespace due to formatting their HTML to be readable.
"
" 8197
"
" 4172
"
" 1052
"
" 469
"
" 1
"
" 413
"
" 21
"
" 3099
"
" 224
"
" 497
"
" 96
"
" 157
" " 19240
"
" 52
"
" 242
"
" 122
"
" 472
"
" 6117
"
" 242
"
" 4
"
" 17
"
" 3126
"
" 1132
"
" 2
"
" 7
"
" 545
"
" 445
"
" 78
"
" 2
"
" 166
"
" 140
"
" 1
"
" 51
"
" 26
"
" 11
"
" 7
"
" 2
"
" 3
"
" 29
"
" 6
" " 1
" " 1
"
" 7
"
" 7
"
" 1
"
" 7
" " 2
"
" 9
" " 1
"
" 1
"
" 1
"
" 2
"
" 2
"
" 1
"
" 8
"
" 1
"
" 1
"
" 1
"
" 1
" " 1
" " 1
" " 1
" " 1
" " 2
" " 1
" " 3
" " 1
" " 1
" " 1
" " 2
"
" 1
"
" 8
"
" 2
"
" 1
--
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