Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long queue time on the initial index.html request during SW update with heavy precache #3294

Open
taozhou-glean opened this issue Feb 10, 2024 · 1 comment

Comments

@taozhou-glean
Copy link

taozhou-glean commented Feb 10, 2024

Welcome! Please use this template for reporting bugs or requesting features. For questions about using Workbox, the best place to ask is Stack Overflow, tagged with [workbox]: https://stackoverflow.com/questions/ask?tags=workbox

Library Affected:
workbox-precaching

Browser & Platform:
all browsers

Issue or Feature Request Description:

notice long queue time on the initial index.html request when SW updates itself, especially when it requires a lot changes in precached assets, it seems the request on handling the index.html got blocked by all the other fetches happening on precache.

repro step is:

  1. on a website that precache a lot files (hundreds of them)
  2. clear the Cache but keep the service worker - you may also want to disable network cache
  3. enable update on reload for SW
  4. reload
image image

our precache setting is very short:

precacheAndRoute(self.__WB_MANIFEST, { ignoreURLParametersMatching: [/.*/] })

tho the __WB_MANIFEST is quite a lot, like ~500 assets , and it does include the index.html itself, not sure if that's the issue that why index.html request itself got queued there - I would expect it will serve the old version with the old service worker before precache finished

@taozhou-glean
Copy link
Author

tried to mark precache requests to low priority but still the highest request is waiting on low priority requests, seems wrong:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant