Improve DisplayListPayload preallocations
Categories
(Core :: Graphics, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: aosmond, Assigned: aosmond)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Observed in bug 1784940 and https://share.firefox.dev/3zX823M. Most of the jank was due to the font locks, but a sizeable amount of the profile was spent reallocating each frame. It is probably because the maximum size for the DisplayListPayload preallocations is too small.
I think we can try to fallibly allocate the same size buffers as before. If we fail, then just start with empty preallocations. Better to fail later on the sizes we actually end up needing to paint the display list. If there is memory pressure, or if we move away from the tab, we will get cleared anyways.
Assignee | ||
Comment 1•2 years ago
|
||
Instead of setting a ceiling on how much we are willing to allocate, we
should always try to reallocate a buffer the same size that we used
before. If we cannot, we should fail gracefully and just not preallocate
at all. This should help with profiles where we consistently need a
larger payload buffer than the previous maximum, while minimizing OOM
crashes on the other side, where our preallocations fail and/or are more
than the next display list update actually requires.
Assignee | ||
Comment 2•2 years ago
|
||
This will signature shift those annotated in bug 1531819 to other areas.
Comment 4•2 years ago
|
||
bugherder |
Description
•