Open Bug 2007550 Opened 6 months ago Updated 6 months ago

Consider widening the startup window during which the ScriptPreloader accepts stencils for caching

Categories

(Core :: XPConnect, enhancement)

enhancement

Tracking

()

People

(Reporter: mstange, Unassigned)

Details

In the parent process, the ScriptPreloader currently accepts new stencils until browser-delayed-startup-finished (STARTUP_COMPLETE_TOPIC) and from then on rejects any new NoteStencil calls. But it waits until browser-idle-startup-tasks-finished (CACHE_WRITE_TOPIC) plus a few seconds of waiting (see bug 2007546) before it starts preparing the cache data. During this window of time, the main thread keeps importing more modules: https://share.firefox.dev/45hoPin

It seems to me that modules that get imported later during startup would also benefit from being cached in the ScriptPreloader.

We should investigate whether we can leave the window open longer. Either up until browser-idle-startup-tasks-finished, or maybe even all the way up until after the n-seconds wait, though that would make the set of cached scripts slightly less deterministic.

You need to log in before you can comment on or make changes to this bug.