Re: [whatwg/fetch] Allow service-workers mode to be set in fetch options (#492)

It seems to me we expose "skip the service worker" as an algorithm primitive within the browser for non-perf reasons.  Sometimes you functionally want things to bypass the service worker.  I don't see a reason to hide this primitive from content.

In terms of perf:

> "If we send 40 or so requests from the window at once, while the first few may be quick, the other events get tacked onto the end of the Service Worker event loop and end up getting delayed quite a bit before they can hit the network"

Its possible that the event loop is not actually busy, but that the round trip to the worker and back to the main thread to resume the channel is running into main thread jank.  This is something that browsers can eventually optimize.

Anyway, that's my suspicion based on the testing I did over in:

https://github.com/w3c/ServiceWorker/issues/756#issuecomment-242275539

I guess the case that a skip-service-worker flag would really help is where you believe the response may be in a memory cache.  For example, chrome's rendered side network cache or something like a stylesheet memory cache.  In those cases bypassing the service worker check could dramatically speed things up.  Related to that:

https://github.com/w3c/ServiceWorker/issues/962

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/492#issuecomment-283996709

Received on Friday, 3 March 2017 16:15:51 UTC