Investigate better design for nsPresArena.
Categories
(Core :: Layout, enhancement)
Tracking
()
People
(Reporter: emilio, Assigned: emilio)
References
(Blocks 2 open bugs)
Details
Attachments
(1 external file)
Bug 2086477 and the other regressions from bug 2083301 end up basically on the same "we scatter frames around". The sorting helps a bit for common patterns like speedometer (bug 2085386) because the content shapes are similar.
I looked around a bit, and https://docs.webkit.org/Deep%20Dive/Libpas/Libpas.html has a similar feature to what we want called IsoHeaps we might be able to borrow ideas from. AFAICT by doing something like keeping per-type-pages:
- We reduce significantly the fragmentation / scattered memory.
- We would be able to decommit memory (rather than keeping it always around) which is nice.
Filing to experiment with this.
| Assignee | ||
Comment 1•10 days ago
|
||
| Assignee | ||
Comment 2•10 days ago
|
||
- https://perf.compare/compare-lando-results?landoInstance=lando-prod-2025&baseLando=114134&newLando=114135&baseRepo=try&newRepo=try&framework=13
- https://perf.compare/compare-lando-results?landoInstance=lando-prod-2025&baseLando=114134&newLando=114138&baseRepo=try&newRepo=try&framework=13
- https://perf.compare/compare-lando-results?landoInstance=lando-prod-2025&baseLando=114135&newLando=114138&baseRepo=try&newRepo=try&framework=13
| Assignee | ||
Comment 3•10 days ago
|
||
This refactors the process-global pres arenas to achieve the following
goals:
-
No unbounded memory growth: Pages can be decommitted now, while still
reserved so that they don't get reused by other types. Note that we
still keep slab metadata around, but those are much smaller
allocations. -
Better memory locality: Superblocks store a bunch of slabs, which are
close together, but can be used for different types each. Each slab
is only used for a single type over its lifetime, but this achieves
better memory locality between objects of the same type (before that
we relied on the allocation order).
The design is similar to LibPAS IsoHeaps. This is a decent speedometer
improvement and addresses some of the microbenchmark regressions that
we've seen from making the nsPresArenas process-global.
Updated•10 days ago
|
Description
•