11-15-2019, 11:19 PM
Testing: https://jpeg.speedcf.com/swtest.html with and without ServiceWorker gives very different results in Chrome.
Without SW all images are requested immediately and received in parallel.
On the second run, when ServiceWorker kicks in, "waiting" state appears all over the waterfall. Image requests are significantly delayed, and responses arrive one by one, instead of being streamed in parallel.
ServiceWorker in this case is intentionally the most basic one:
I'm seeing the delays only in Chrome. In Firefox runs with and without ServiceWorker are identical.
Is that some quirk of WebPageTest, e.g. related to simulation of slow connections? Can this be a Chrome bug?
Here's an example run: https://www.webpagetest.org/result/19111...6e3e632bf/
[attachment=923]
[attachment=922]
Without SW all images are requested immediately and received in parallel.
On the second run, when ServiceWorker kicks in, "waiting" state appears all over the waterfall. Image requests are significantly delayed, and responses arrive one by one, instead of being streamed in parallel.
ServiceWorker in this case is intentionally the most basic one:
Code:
self.addEventListener('fetch', event => {
return event.respondWith(fetch(event.request));
});
I'm seeing the delays only in Chrome. In Firefox runs with and without ServiceWorker are identical.
Is that some quirk of WebPageTest, e.g. related to simulation of slow connections? Can this be a Chrome bug?
Here's an example run: https://www.webpagetest.org/result/19111...6e3e632bf/
[attachment=923]
[attachment=922]