Page MenuHomePhabricator

Bug 1607836 - Preallocate picture task dependency vectors. r=gw
ClosedPublic

Authored by nical on Jan 16 2020, 9:18 PM.

Details

Summary

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

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 16 2020, 9:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 16 2020, 9:18 PM
phab-bot requested review of this revision.Jan 16 2020, 9:18 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 19 2020, 7:32 PM

I wonder if there's a way to make such optimizations less custom each time.

For instance, I wonder if it might make sense to have a struct that holds "recyclable" vecs and at the end of the frame, and used vecs can be added to that from any subsystem, and then on the next frame, systems can claim vecs from that struct. Not exactly sure how it would work, but it might be worth pondering / discussing this in future?

This revision is now accepted and ready to land.Jan 19 2020, 7:32 PM