New issue
Advanced search Search tips

Issue 919963 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Consider opening ServiceWorkerStorage disk_cache immediately

Project Member Reported by wanderview@chromium.org, Jan 8

Issue description

Currently 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.
 
Status: Untriaged (was: Assigned)
Well, I'm not sure if this is a good idea.  It means holding a few kb of memory around in the browser process before that data is needed.  Also, it could slow down browser start which is more important than a service worker thread start.
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)
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
Labels: -Type-Bug Type-Feature
Status: Available (was: Untriaged)
Summary: Consider opening ServiceWorkerStorage disk_cache immediately (was: consider open ServiceWorkerStorage disk_cache immediately)
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