DevTools: Network throttling of service worker and host page are independent |
|||||||
Issue descriptionVersion: 51.0.2671.0 canary OS: OS X The host page and service worker have separate DevTools windows, and also separate network throttling controls. This can lead to pages loading much faster than expected if the host page has throttling turned on, but the service worker does not, and network requests go via the service worker. (Whilst on some level a separate throttle for the service worker makes sense (since it's independent of its clients), I think this behavior is confusing and unexpected. If the client's DevTools is open and throttling enabled, the throttling level should also apply to that of the service worker.) Demo: https://rawgit.com/ithinkihaveacat/98fe7fd14e42f7fb4deb/raw/a709e2d7dc8c9d3dd5879b0525963a18ead2131e/index.html (Open DevTools.) What is the expected output? ~250k image takes more than 30s to load. What do you see instead? Image loads in under 10s. Please use labels and text to provide additional information.
,
Mar 9 2016
Looks like this is quite dependent of how you're inspecting each. Here's what it looks like One devtools for both threads * Only open page's devtools * (Go to resources > SW to confirm SW is up and running) * Set throttling * Throttling will be set on the connected SW as well. It works as expected Two devtools open * Open page devtools * Set throttling * Open SW devtools * Throttling is initialized to "off" there. So, TLDR: 1. The UI doesn't currently lie. That's good. 2. It's confusing that kicking off the SW's dedicated devtools doesnt inherit the page's throttling settings. 3. Throttling changes arent synchronized between the two devtools. Not sure if we'd want to. I think the ideal case is you don't need two devtools. Michael, I wonder if we can solve that last piece, instead. Can you currently do your work with only the page's devtools?
,
Mar 9 2016
,
Mar 9 2016
Right now I'd prefer to use two devtools, so I can be more confident about exactly which requests are happening, and so that the service worker console and the page console are separate. I can see why it's useful (and more consistent) to keep them separate, however so far I've never needed to debug a service worker with more than one controlled client. And if there's almost always going to be a 1:1 mapping it's annoying to need to throttle twice.
,
Mar 9 2016
Yup. Sounds good. I wonder if there are other settings that we would want to keep in sync between the two. Any ideas?
,
Mar 30 2016
,
Jun 3 2016
,
Jun 9 2016
,
Jun 9 2016
,
Jul 29 2016
I think we should improve inspecting of both page and sw in the same DevTools, and this issue will not arise.
,
Sep 20 2016
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by paulir...@chromium.org
, Mar 9 2016