Issue metadata
Sign in to add a comment
|
service worker could start reading body blob before messaging main thread |
||||||||||||||||||||||||
Issue descriptionI'm splitting this off from https://crbug.com/881141#c5 : Another optimization we can make here is to create and start filling the response DataPipe immediately in the service worker thread: https://chromium-review.googlesource.com/c/chromium/src/+/1214684 In the current code the service worker sends the GotResponse() mojo message back to the main thread. The main thread then starts to load the blob. If the main thread is busy with js then the start of the blob reading can be delayed for long periods. By starting the read immediately we can at least fill the DataPipe if the main thread is janking.
,
Sep 10
,
Sep 11
,
Sep 11
I've been looking into the background thread Makoto-san mentioned in his comment and it does appear the blob ReadAll() is being initiated there. So its not blocking on the main thread as I asserted in my original analysis. This was fixed by Kinuko-san in bug 854902 . I'm close to just duping this to bug 854902 , but I'm trying to understand if/why performance traces seem improved with my CL here first.
,
Sep 11
I believe the gains I was seeing were due to removing the side data reading that took place before initiating the body read. I'm going to dupe this bug and open a new one to investigate performing the two reads in parallel. Sorry again for my confusion. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by wanderview@chromium.org
, Sep 10