New issue
Advanced search Search tips

Issue 853060 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Persist which service worker IDs have background fetch data

Project Member Reported by rayankans@chromium.org, Jun 15 2018

Issue description

At the moment, on a browser restart, the BackgroundFetchDataManager checks all registered service workers to see if they have fetch information. Ideally we should know ahead of time exactly which ServiceWorker databases to query.
 
Labels: -Pri-3 Pri-1

Comment 2 by peter@chromium.org, Jun 22 2018

Check out ServiceWorkerContextWrapper::GetUserDataForAllRegistrations() and ServiceWorkerContextWrapper::GetUserDataForAllRegistrationsByKeyPrefix() which may be useful.
Looking at the code, this does roughly the same job (though abstracted). It still gets all swids and then looks for a prefix for each. 

If this is good enough, then great. But if we want to minimize DB queries, storing the exact swids would be better.

Comment 4 by peter@chromium.org, Jun 22 2018

Yeah, but it does so in the ServiceWorkerDatabase class - where we can avoid a ton of thread jumps and scheduling logic by doing it in a centralized place. It'd be a massive win already.

Sign in to add a comment