-
Notifications
You must be signed in to change notification settings - Fork 49.6k
[DevTools] Don't inline workers for extensions #34508
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
[DevTools] Don't inline workers for extensions #34508
Conversation
3e3ed1d
to
a08bca1
Compare
Comparing: 27b4076...74a26e0 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
a08bca1
to
ec61196
Compare
cdf65b6
to
eac0b53
Compare
a62fabe
to
74a26e0
Compare
// workers in this bundle, we can sync require the module since it's just a thin | ||
// wrapper around calling the worker. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2kB to be specific
- name: Archive Playwright report | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: devtools-playwright-artifacts | ||
path: tmp/playwright-artifacts | ||
if-no-files-found: warn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will help debugging CI failures even though that wasn't necessary here. The issue was reproducible locally.
The source of workers was inlined since workers were introduced in #21902.
Inlining the worker meant it was not subject to minification. The hook name parser worker can be minified down to 839kB (from ≈1.6MB) and file fetcher to 218kB (from ≈400kB). This allows us to not create an async chunk for the worker loader. It's just 2kB that avoids a waterfall from loading the module and then loading the worker. Now we load the worker directly.
I only did this for the extensions since we have full control of the public path and where assets are placed. Can't guarantee the same for the other bundles especially because testing those is non-trivial.
Test plan
Hook name parsing works in https://rf3fky.csb.app/ for Edge, Chrome and Firefox