Persist which service worker IDs have background fetch data |
|
Issue descriptionAt 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.
,
Jun 22 2018
Check out ServiceWorkerContextWrapper::GetUserDataForAllRegistrations() and ServiceWorkerContextWrapper::GetUserDataForAllRegistrationsByKeyPrefix() which may be useful.
,
Jun 22 2018
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.
,
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 |
|
Comment 1 by rayankans@chromium.org
, Jun 20 2018