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

feat(workbox-precaching) Support for concurrent prefetching #3205

Open
wants to merge 1 commit into
base: v7
Choose a base branch
from

Conversation

C-Hess
Copy link

@C-Hess C-Hess commented May 5, 2023

Fixes #2880

Added the ability to precache requests concurrently. It looks like this used to be a feature in #2528, but was removed because it had no limits to the number of concurrent connections, resulting in a lack of resources for large sites with hundreds of assets.

This feature is opt-in, and should be non-breaking. Though it looks like this ticket is part of the V7 milestone. It may be possible to just bump a minor version for this.

Let me know if there's anything I missed that you'd like to see. One thing that might be interesting in the future is a dynamic concurrent request feature, where the lack of HTTP/2+ support or browser resource errors results in the throttling of the batch sizes.

@google-cla
Copy link

google-cla bot commented May 5, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@@ -27,10 +28,11 @@ import './_version.js';
*/
function precacheAndRoute(
entries: Array<PrecacheEntry | string>,
options?: PrecacheRouteOptions,
routeOptions?: PrecacheRouteOptions,
controllerOptions?: PrecacheControllerOptions,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big fan of the two option arguments. Combining them into a single options argument in a non-breaking manner didn't sit well with me either.

Fix lint

Add tests for concurrent precaching

Improve documentation
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

Successfully merging this pull request may close these issues.

Option to precache multiple requests simultaneously
1 participant