Closed Bug 1565522 Opened 6 years ago Closed 6 years ago

Save non-startup shaders to disk as well as startup shaders

Categories

(Core :: Graphics: WebRender, task, P3)

task

Tracking

()

RESOLVED DUPLICATE of bug 1614679

People

(Reporter: jnicol, Assigned: jnicol)

Details

Currently shaders that are used within the first 10 frames are saved to disk, and then loaded on subsequent startups as an optimisation. Previously this worked by simply loading the entire set of cached shaders, meaning that when saving the shaders we needed to delete those which are not required for startup. In bug 1535146, however, we made it so that a list of which shaders to load during startup is also saved. This means that shaders which are not required for startup can still be saved to disk without impacting startup time. Any cached shader which is not loaded during startup can still be loaded on demand, which should be faster than compiling them from scratch.

We should therefore save shaders which are compiled after the 10th frame to disk, as well as those used during the first 10 frames. As this is a non-critical optimisation it can be done at a low frequency so as to not affect performance. And we must make sure that we do not add these shaders to the list of startup shaders, so that we don't slow down startup.

Oh, whoops. I forgot I'd already filed this, and recently filed bug 1614679 and landed a fix there

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.