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

Quick attempt for splitting builds #258

Closed

Conversation

lewisl9029
Copy link
Contributor

@lewisl9029 lewisl9029 commented Feb 10, 2022

Starting with a quick rollup config change + search & replace for shimMode -> self.SHIM_MODE

Size for non-wasm integrated build in main:
9160

New non-wasm polyfill build size:
9019

New non-wasm shim build size:
8805

Interestingly enough there were more savings for shim mode than polyfill mode. But in both the savings are not very significant (<0.5kb).

It could be possible to get more savings with some more careful optimization, but that's out of scope for this current PR.

Feel free to close once you've had a chance to take a look!

Starting with a quick rollup config change + search & replace for shimMode -> self.SHIM_MODE

Size for non-wasm integrated build in main:
9160

New non-wasm polyfill build size:
9019

New non-wasm shim build size:
8805

Interestingly enough there were more savings for shim mode than polyfill mode. But in both the savings are not very significant (<0.5kb).

It could be possible to get more savings with some more careful optimization, but that's out of scope for this current PR.
@guybedford
Copy link
Owner

Good to know, yes the polyfill footprint is the one to optimize. The best savings likely start with removing unneeded features (eg if you don't need to polyfill import maps we can remove all that stuff), but this likely becomes more important once (a) the baseline progresses or (b) there are new features being polyfilled that require overhead. Definitely worth keeping an eye and reassesing the status here.

@lewisl9029 lewisl9029 closed this Feb 11, 2022
@guybedford
Copy link
Owner

@lewisl9029 I'm reconsidering picking this up again to integrate #269 and having separate development and production builds. This is a useful comparison, thanks again.

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