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

perf: disable subgraph passthrough #208

Merged
merged 2 commits into from
Oct 7, 2021
Merged

Conversation

guybedford
Copy link
Owner

This is another case discovered by the performance testing actually. And that is that it turns out that while Firefox and Safari seem to share their script cache with their fetch cache, they don't actually seem to do the converse in sharing the fetch cache with the module cache. As a result, when polyfilling a module graph, if any of those subgraph modules are directed to the native loader URL instead of using the blob version this results in a double fetch and causes a bandwidth slowdown.

By ensuring that in the polyfill case all subgraphs use the blob form as fetched, we avoid this slowdown. For normal module loads that aren't blobs we maintain the native registry.

A documentation note is included for polyfill mode that having some graphs as native and some being polyfilled will result in no instance sharing between these.

@guybedford guybedford merged commit 0bca4a8 into main Oct 7, 2021
@guybedford guybedford deleted the disable-subgraph-passthrough branch October 7, 2021 19:43
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.

1 participant