Re: [slightlyoff/ServiceWorker] Eliminating SW startup latency for common case (#920)

> I'd like to know how specific this is to Chrome. From a high-level perspective it seems like a very weird hack.

I don't think this is particularly chrome specific.  Starting a worker thread, parsing js, interpreting, running the jit if necessary, etc are all overhead to letting the SW handle the fetch event.  Coming up with a mechanism to allow this overhead to be performed in parallel with an initial network request would benefit all browsers.

I guess ultimately its a tradeoff between complexity and those overhead costs.  Firefox might be slightly faster to start a service worker right now (I don't really know though), but we will likely end up with overhead similar to chrome once we fix our infrastructure to handle multiple content processes.

If we can come up with something that is not too complex, then it seems like a useful addition.

I do kind of agree with Jake, though, that maybe we should wait to implement these kinds of optimizations.  Its still early days for people figuring out how they want to use service workers.  If we implement this now we might miss out on a useful pattern people find they need or might make it more general purpose (complex) than is needed.

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

Received on Tuesday, 28 June 2016 16:48:52 UTC