Consider opening ServiceWorkerStorage disk_cache immediately |
||
Issue descriptionCurrently ServiceWorkerStorage lazily opens its disk_cache when its first needed. This most likely results in a service worker startup paying the cost of reading in the simple disk_cache's index file. To help reduce variance in worker startup time maybe we should consider initializing the disk_cache immediately.
,
Jan 9
Yeah doing this during the browser startup should be definitely avoided. There might be some other speculative approaches that are worth exploring though (like what we do for spare renderer process in some cases)
,
Jan 9
Note BrowserThread::PostAfterStartupTask can be used to do things "soon" after startup. We use this to delay service worker registration jobs already: https://cs.chromium.org/chromium/src/content/browser/service_worker/service_worker_register_job.cc?type=cs&sq=package:chromium&g=0&l=100
,
Jan 9
On the other hand, having too many of these after startup tasks can be bad too. Anyway we can keep this open as an idea. |
||
►
Sign in to add a comment |
||
Comment 1 by wanderview@chromium.org
, Jan 8