Page MenuHomePhabricator

Bug 1611176 - Avoid expensive memmoves when adding render tasks. r=gw
ClosedPublic

Authored by nical on Jan 23 2020, 3:47 PM.

Details

Summary

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.

Diff Detail

Repository
rMOZILLACENTRAL mozilla-central
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

nical created this revision.Jan 23 2020, 3:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 23 2020, 3:47 PM
phab-bot requested review of this revision.Jan 23 2020, 3:47 PM
phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: Restricted Project.
gw accepted this revision.Jan 23 2020, 7:26 PM
This revision is now accepted and ready to land.Jan 23 2020, 7:26 PM