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

Avoid intercepting network requests in the service worker when we don't need to #150

Merged
merged 1 commit into from
Jul 14, 2024

Conversation

georgestagg
Copy link
Collaborator

When we're not intercepting a Wasm app URL and not adding COI headers to a request, we can avoid a (potentially many MB) copy in the service worker by not intercepting the request at all.

This should reduce noise in the Network tab of web browsers' devtools, and provide a minor performance boost when fetching additional content for webR, such as .../cairo.so

When not intercepting an app URL, and not adding COI headers, we can
avoid a copy in the service worker by not intercepting the request at
all.
@georgestagg georgestagg requested a review from schloerke July 13, 2024 15:29
Copy link
Collaborator

@wch wch left a comment

Choose a reason for hiding this comment

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

Good thinking!

@georgestagg georgestagg merged commit 273c5cb into posit-dev:main Jul 14, 2024
2 checks passed
@georgestagg georgestagg deleted the avoid-sw-intercept branch July 14, 2024 09:09
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.

2 participants