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

3.4% bundle size increase after upgrading from 4.x to 5.1.2 #37

Open
alisnic opened this issue Jul 27, 2023 · 2 comments
Open

3.4% bundle size increase after upgrading from 4.x to 5.1.2 #37

alisnic opened this issue Jul 27, 2023 · 2 comments

Comments

@alisnic
Copy link

alisnic commented Jul 27, 2023

Not sure whether it's really an issue, but it would be interesting whether anyone has any insights as to why this might happen.

Screenshot 2023-07-27 at 09 51 51
@radekmie
Copy link

Now since #35 got fixed, I see the same issue in our app:

874M  build-new/bundle/programs
839M  build-old/bundle/programs

772M  build-new/bundle/programs/server
772M  build-old/bundle/programs/server

52M build-new/bundle/programs/web.browser
34M build-old/bundle/programs/web.browser

51M build-new/bundle/programs/web.browser.legacy
34M build-old/bundle/programs/web.browser.legacy

8.6M  build-new/bundle/programs/web.browser/4d5ffa015be53bdfae31104534de5bf37056062c.js.map

18M   build-new/bundle/programs/web.browser/dynamic
8.9M  build-old/bundle/programs/web.browser/dynamic

16M   build-new/bundle/programs/web.browser/app
16M   build-old/bundle/programs/web.browser/app

1.3M  build-new/bundle/programs/web.browser/program.json
788K  build-old/bundle/programs/web.browser/program.json

6.9M  build-new/bundle/programs/web.browser/4d5ffa015be53bdfae31104534de5bf37056062c.js
6.8M  build-old/bundle/programs/web.browser/7ffcc57cd00d054b1633f314dc879fa01a6082aa.js

220K  build-new/bundle/programs/web.browser/4d5ffa015be53bdfae31104534de5bf37056062c.stats.json
220K  build-old/bundle/programs/web.browser/7ffcc57cd00d054b1633f314dc879fa01a6082aa.stats.json

124K  build-new/bundle/programs/web.browser/packages
124K  build-old/bundle/programs/web.browser/packages

4.0K  build-new/bundle/programs/web.browser/head.html
4.0K  build-old/bundle/programs/web.browser/head.html

1.2M  build-new/bundle/programs/web.browser/866e7cc6595bd4477ec8f4124fe3a51c87d050e9.css
1.2M  build-old/bundle/programs/web.browser/866e7cc6595bd4477ec8f4124fe3a51c87d050e9.css

However, after I got rid of all .map files, the difference is ~2.1% increase in the main bundle size (~0.1% increase gzipped). I guess that's just the matter of different minifier, e.g., different handling of long template strings or even mangling ordering (the bundle looks completely different).

@zodern
Copy link
Owner

zodern commented Jul 27, 2023

That's interesting. Currently it uses the same settings for both the legacy and modern clients. We probably could adjust how it minifies the modern client to enable more optimizations.

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

No branches or pull requests

3 participants