-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Bundle size regression in 3.5 #12039
Comments
Free performance improvements are a pretty big feature |
The main reason is that the |
Fair point, but it's pretty much not free if it's at the expense of bundle size, which is one of the most important performance metrics (and it's definitely not free for me now, because I have to mitigate the regression elsewhere to stay within our budget).
Makes sense, I saw a #12007 PR trying to mitigate some of that. Is there a plan to continue? Do you think there's a chance that a larger effort like that would be merged? There's seems to be some low hanging fruit - swapping functions with arrow functions, replacing switches with if-else, etc. but I'm not sure what's a long term plan for the package or if there's some changes that are not desirable because of style guide (or other reasons, I'm not sure why exactly are classes used in the codebase, so I'd be hesitant to replace them for example). |
Vue version
3.5
Link to minimal reproduction
https://bundlephobia.com/package/[email protected]
Steps to reproduce
Update to 3.5
What is expected?
No significant size increase
What is actually happening?
Bundle size increased by 8% from 41.2 kb gzipped to 44.5.
System Info
No response
Any additional comments?
I don't know it this is expected but it's pretty unfortunate, because there were no significant additional features, and we don't use anything new either - bundle size increase is unconditional, just bumping the version failed our size-limit on CI.
There's also a lot of room for improvement - If I look at the output, there's a lot of
function
keywords, classes, switch statements andthis
accesses. Those can all be eliminated by using smaller equivalents (e.g. arrow functions instead of functions, if statements instead of switches, etc.).The text was updated successfully, but these errors were encountered: