[CTW] Atomize more value strings to reduce memory usage
Categories
(Core :: Disability Access APIs, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox109 | --- | fixed |
People
(Reporter: Jamie, Assigned: Jamie)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
We avoid string attribute values in a lot of places now, but there are still at least two values we could probably atomize: font-family and language. Because these are currently copied down the tree rather than inherited from ancestors, there would be a lot of duplicates. Font-family is pretty much always present on every element. Language isn't always, but if it is set, it will be copied to all descendants. Perhaps we could come up with a way to inherit these from ancestors (though that raises some tricky questions regarding mutations), but even then, we're likely to see duplicates of these strings.
Assignee | ||
Comment 1•2 years ago
|
||
Doing this reduces the a11y cache size for html.spec.whatwg.org by about 15 mb while only increasing the atoms table size by about 3 mb. Many font family names and languages are shared across sites, which will often further mitigate the increase in atoms table size when several pages are loaded.
Assignee | ||
Comment 2•2 years ago
|
||
This reduces memory used by the cache, since the same font family and language strings often occur many times in the same document (and likely even across documents).
Updated•2 years ago
|
Comment 4•2 years ago
|
||
bugherder |
Description
•