Re: [w3c/ServiceWorker] consider allowing multiple worker thread instances for a single registration (#756)

First, love the data @wanderview; amazing stuff! The data about Cache API overhead is fascinating. Something we should all compete on driving down = )

Some other out-of-order thoughts:

 - Regarding the addition to allow caching in-process, this is something we debated heavily inside the Chrome team regarding our memory-cache behavior (specifically) for images back in '12-'13. I think we'd love to be able to add something to a response that acts as a memory-cache control header.
 - The data suggests to me that sites that are seeing SW-induced latency (like the blocking worker case) do need tools to work around it. Dedicated Worker and perhaps Shared Worker improvements to let them fit more naturally in the Promise-based API ecosystem seem like a great thing.
 - We do have a metric (`ServiceWorker.StartWorker.Purpose`) that measures which event caused a SW start. I see ~6% of starts coming from message events vs. ~4% for Push delivery, ~30% for main-frame navigations, and a surprisingly high 53% for sub-resource fetches.  Perhaps @mattto, @kinu, or @nhiroki can weigh in or shed more light.
 - I'd love for us to explore how we can make an opt-in version of the multi-SW system possible for sites that want or need it. Opting into this treatment on an event-type basis seems reasonable to me, but as you mention, I think we should see how far we can get with sub-workers first.
 - Lastly, I guess I'm a little surprised the gains for multiple SW threads are so small. 10% ain't nothing, but it's in the range some strong optimisation in other subsystems can eek out in a few quarters.

Again, amazing data and great work both to @wanderview for prototyping and @jakearchibald for making a benchmark we can use for this sort of thing.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/756#issuecomment-242606729

Received on Friday, 26 August 2016 02:18:01 UTC