service worker - slow instantiating or slow pulling cache in GeckoView Android app
Categories
(Core :: DOM: Service Workers, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | affected |
People
(Reporter: colormatch, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0
Steps to reproduce:
Service workers are not immediately available, or are pulling cached resources slowly, which may result in sluggishly booting apps using GV.
Setup:
A small fast initial html, and larger second resource file.
After first run, the second (resource) file is cached and delivered through a service worker.
Running the app in Chrome-desktop, resource file is loaded immediately.
Running the app in Firefox-desktop, resource file is loaded with small delay (~150ms)
Running the app in WebView-Android Phone, resource file is loaded with small delay (~150ms)
Running the app in GeckoView-Android Phone, resource file is loaded after about ~1,000ms (1 sec)
By the timing alone, it's hard to tell if GV is pulling the resource file from the server or not, as it takes the same time (in my case) for the app to download and load the resource file, as the time to get it from the service worker / cache.
Comment 1•5 years ago
|
||
Sending this bug to the Service Worker Bugzilla component.
Running the app in GeckoView-Android Phone, resource file is loaded after about ~1,000ms (1 sec)
Is this slow loading problem reproducible in Firefox Preview (Fenix) or the GeckoViewExample app?
Updated•5 years ago
|
Reporter | ||
Comment 2•5 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #1)
..
Is this slow loading problem reproducible in Firefox Preview (Fenix) or the GeckoViewExample app?
Yes.
(tested Fenix)
Looking a bit more into it, (I'm guessing here) it seems this may be due to caching compiled code in network cache, which gets scrubbed in reloading.
Mapping the source content to the decoded / compiled version of the source (available after page reload), ** for the assets delivered by the service-worker **, should produce an increased performance load for a lot of web-sites too.
Reporter | ||
Comment 3•5 years ago
|
||
i.e. - cache and deliver the compiled bytecode of sw's assets (even after reload).
Comment 4•5 years ago
|
||
That's probably bug 1336199 then plus related follow-ups (including some new ones we'll likely file).
Reporter | ||
Comment 5•5 years ago
|
||
(In reply to Andrew Sutherland [:asuth] (he/him) from comment #4)
That's probably bug 1336199 then plus related follow-ups (including some new ones we'll likely file).
sounds like it.
You can see the effect on kinoseed dot com.
After the first page visit, everything is served by the service-worker.
The page initially is loading a light UI (10k), and then an operational resource 200k, which brings up LUT selection when loaded.
Refresh the page and you will see the delay in action.
Reporter | ||
Comment 6•5 years ago
|
||
marking the bug as duplicate of bug 1336199
Description
•