-
Notifications
You must be signed in to change notification settings - Fork 321
Description
From https://code.google.com/p/chromium/issues/detail?id=470036
It's fairly costly for our implementation to populate client.visibilityState and client.focused when dispatching the fetch event. We have to hop from the IO thread to the UI thread and back again. Doing that on every network fetch would surely make SW slower than non-SW.
I'd like to hear Mozilla's take on this @nikhilm @wanderview. If there are similar concerns, I'm happy to change this to a client ID, or perhaps rethink how we get this information from clients.
Other options include fetchEvent.getClient() which returns a promise, or move the state properties on client into something like client.getState() - although this makes iterating over clients to find a focused one kinda tough.