Closed Bug 1487137 Opened 6 years ago Closed 6 years ago

Investigate shrinking AuthorStyles a bit

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: bzbarsky, Assigned: emilio)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

My DMD log shows us allocating thousands of AuthorStyles (see bug 1487135 for maybe addressing that). Each allocation is 2800 bytes, which gets rounded up to 4096 by jemalloc. That is, about a third of the memory actually allocated is wasted. Ideally AuthorStyles would fit in a 2048 byte allocation, or just generally be a lot smaller when it's not actually being used.
Flags: needinfo?(emilio)
Assignee: nobody → emilio
Flags: needinfo?(emilio)
We're wasting 1kb there, which is kind of stupid. The only advantage of using a bloom filter is that memory usage doesn't increase even if there's a gazillion attribute selectors and such. But: * For IDs we already have a bunch of data structures for invalidation and such which key on the id, so the bloom filter would be a very minor thing. * For attribute selectors we don't have such a data structure, but if people used a gazillion attribute selectors we should!
Comment on attachment 9005172 [details] Shrink CascadeData by turning the bloom filters into hash sets. Xidorn Quan [:xidorn] UTC+10 has approved the revision.
Attachment #9005172 - Flags: review+
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/c89d5d8a9f2c Shrink CascadeData by turning the bloom filters into hash sets. r=xidorn
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Perf wins noticed! == Change summary for alert #15620 (as of Mon, 03 Sep 2018 05:32:43 GMT) == Improvements: 4% Images linux64 opt stylo 7,050,024.67 -> 6,784,855.56 2% Images linux64-stylo-sequential opt stylo-sequential7,002,909.87 -> 6,829,607.86 For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=15620
Wonderful.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: