Expensive moves of RenderTask into the tasks vector
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox74 | --- | fixed |
People
(Reporter: nical, Assigned: nical)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
We get a non-trivial amount of time spent in memmove when pushing render tasks into the render graph (5% of total frame building time on a test case with a large amount of text shadows).
We can work around this using the VecHelper trick add().init(value) which performs the potential reallocation before initializing the value.
| Assignee | ||
Comment 1•5 years ago
|
||
On pages with many render tasks (typically a lot of text shadows), we spend a lot of time moving RenderTask which is a fairly large struct into the render graph's buffer. This patch avoids it by using the VecHelper trick of allocaitng space before initializing the value. Some RenderTask::new_* methods which take the render task graph in parameter were modified to add the task and return the task ID to work around borrow-checking restriction.
Updated•5 years ago
|
Comment 3•5 years ago
|
||
| bugherder | ||
Description
•