recycle render task graph allocations
Categories
(Core :: Graphics: WebRender, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: nical, Assigned: nical)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
On pages with a lot of filters (for example lots of small shadows), pushing into the render task graph's vectors show up in profiles.
It should be pretty easy to preallocate the vectors using the size from the previous frame. It would also be nice to avoid having a small vector for each render trask to track dependencies, and instead intern them into a larger vector at the graph level (tasks can refer to their dependencies using a range of indices in the dependency vector).
Assignee | ||
Comment 1•4 years ago
|
||
The majority of render tasks have 0, 1 or 2 dependencies, except for pictures that typically have dozens to hundreds of dependencies. SmallVec with 2 inline elements avoids many tiny heap allocations in pages with a lot of text shadows and other types of render tasks.
Assignee | ||
Comment 2•4 years ago
|
||
Unlike other types of render tasks, pictures can have hundreds of dependencies. The dependency vector is re-built every frame, leading to a lot of vector re-allocations in some pages.
Depends on D60151
Comment 3•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/db0378df4c66
https://hg.mozilla.org/mozilla-central/rev/dfe4fa983d2b
Description
•