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

Release bundle size has ballooned #1992

Closed
twschiller opened this issue Nov 23, 2021 · 7 comments · Fixed by #2549
Closed

Release bundle size has ballooned #1992

twschiller opened this issue Nov 23, 2021 · 7 comments · Fixed by #2549
Assignees
Labels

Comments

@twschiller
Copy link
Contributor

twschiller commented Nov 23, 2021

The 1.4.8 submission to CWS
image

@fregante
Copy link
Contributor

fregante commented Nov 23, 2021

Sizes collected from https://github.com/pixiebrix/pixiebrix-extension/actions/workflows/release.yaml

vMBNotes
1.2.11 19.1 We were already uploading the sourcemaps
1.3.0-rc 18.3
1.3.1 18.9
1.3.2 21.1
1.4.0 24.1
1.4.1 23.3
1.4.2 same
1.4.3 same
1.4.4 same
1.4.5 13.6 Probably not real change, just a consequence of #1760
1.4.6 same
1.4.7 16.2
1.4.8 same

Notable increases in:

  • v1.3.2: +2MB
  • v1.4.0: +3MB
  • v1.4.7: +3MB (probably double, if on the same scale)
    • it happened between 1.4.7-alpha.2 and 1.4.7-beta.1

@fregante fregante self-assigned this Nov 23, 2021
@twschiller
Copy link
Contributor Author

I suspect it's due to Bootstrap imports, but even that shouldn't be 3MB per import. Maybe related to esbuild?

@fregante
Copy link
Contributor

Maybe related to esbuild?

Currently running 2 CI jobs to compare the two https://github.com/pixiebrix/pixiebrix-extension/actions/workflows/release.yaml

@fregante
Copy link
Contributor

fregante commented Nov 23, 2021

It's esbuild, I see huge amounts of SVG-like code in action.js, which is double the size. Maybe the report in the original PR wasn't wrong after all, the "parsed size" was 1.5MB more, hence the larger appearance.

Should I revert it (and bring back longer CI and broken dependency) or should I look into this? Let me know.

I could also find a middle-ground where I use esbuild just to replace the broken dependency (which was cssnano) and restore terser to minify the JS.

Ideally we'd keep esbuild since we'd want to move completely to it eventually, but maybe later rather than sooner.

@fregante
Copy link
Contributor

Example:

69v.382a.5.5 0 01-.5.5H4.605a1.5 1.5 0 01-1.493-1.645L3.356 9.5h-.238c-.195 0-.42.147-.675.48-.21.274-.528.52-.943.52-.568 0-.947-.447-1.154-.862C.123 9.193 0 8.613 0 8s.123-1.193.346-1.638C.553 5.947.932 5.5 1.5 5.5c.415 0 .733.246.943.52.255.333.48.48.675.48h.238l-.244-2.855z",clipRule:"evenodd"}}]})(t)}function g2(t){return GenIcon({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M16 8A8 8 0 110 8a8 8 0 0116 0zM6.57 6.033H5.25C5.22 4.147 6.68 3.5 8.006 3.5c1.397 0 2.673.73 2.673 2.24 0 1.08-.635 1.594-1.244 2.057-.737.559-1.01.768-1.01 1.486v.355H7.117l-.007-.463c-.038-.927.495-1.498 1.168-1.987.59-.444.965-.736.965-1.371 0-.825-.628-1.168-1.314-1.168-.901 0-1.358.603-1.358 1.384zm1.251 6.443c-.584 0-1.009-.394-1.009-.927 0-.552.425-.94 1.01-.94.609 0 1.028.388 1.028.94 0 .533-.42.927-1.029.927z",clipRule:"evenodd"}}]})(t)}function R2(t){return GenIcon({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M9.05.435c-.58-.58-1.52-

@fregante
Copy link
Contributor

fregante commented Dec 3, 2021

Reassigning for visibility (need to know what you'd like me to do)

@fregante
Copy link
Contributor

fregante commented Feb 1, 2022

Found the reason: esbuild only supports tree-shaking partially 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants