New issue
Advanced search Search tips

Issue 720784 link

Starred by 5 users

Issue metadata

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



Sign in to add a comment

Cache Storage API: recreation of the cache bypassing handle retention?

Project Member Reported by jsb...@chromium.org, May 10 2017

Issue description

The repro steps in  issue 713738  - 

1. Visit our PWA at https://editor.construct.net
2. Wait for "available offline" notification in lower left
3. Open dev tools network panel and record a reload of the page.
4. Look for results for dispatchWorker.js and jobWorker.js. On my machine I see results that look like this: https://www.dropbox.com/s/zdek5si1iig1yko/chrome-sw-worker.png?dl=0

... appear to show that the script's cache access pattern causes us to recreate the cache repeatedly in the back end, rather than keeping the handle around for 30 seconds.

We should verify and minimize the repro.
 
Ah, I see. This is a result of https://codereview.chromium.org/2100433003 which changed from keeping every recently opened cache alive for a few seconds to only keeping ones that the renderer had handles to open for a few seconds.

Some caches are opened temporarily on behalf of the renderer but not passed back to the renderer, e.g., for caches.match() calls. This means successive calls to caches.match() wind up opening/closing every cache for the origin over and over.

I think we should essentially revert 2100433003 but keep the timer short (5 seconds or possibly less) so that we don't hold the caches open longer than necessary.
I didn't fully explain why reverting is okay. The main issue that 2100433003 addressed was that the quota manager, on startup, needs to know the size of every cache on every origin. It used to be that we actually opened all the caches to answer that question, and keeping them all open was bad for resource usage. Now we sync that data to disk at the CacheStorage level and don't need to open the backends.
Cc: bsittler@chromium.org
Possibly a duplicate of https://bugs.chromium.org/p/chromium/issues/detail?id=801024 but have not yet repro'ed so still unsure

Comment 4 by jsb...@chromium.org, Jan 19 2018

Cc: jsb...@chromium.org
Owner: ----
Status: Available (was: Assigned)
Unassigning from myself, as apparently I'm not working on it. :P
Owner: bsittler@chromium.org
Status: Assigned (was: Available)
Self-assigning while attempting repro

Comment 6 by jsb...@chromium.org, May 29 2018

Cc: -bsittler@chromium.org -jsb...@chromium.org
Owner: ----
Status: Available (was: Assigned)

Sign in to add a comment