-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Svelte "hello world" increased by 4.37kB (~59%) between Svelte 3.37.0 and 3.38.0 #6462
Comments
Yep I think it would probably make sense to have dumb versions of the claim functions that are used when hydration is not enabled at compile time. |
I count around 4521 letters in the diff (quite close to 11.79K - 7.42K) with around 1719 characters from comments. So I guess this is the bundle size for debug builds, right? Do bundle sizes also influence performance significantly when running locally in debug mode? (I am kinda new to modern high performance Js development so I am curious as to what should be optimized. The thought did not even occur to me to measure the actual byte size of my code while writing the PR 😂) |
This isn't in |
If this is already the optimized code, shouldnt svelte minify variable and functions names for further reduction of code size? |
I think that's a separate issue: #1102 (comment) My request here would probably boil down to: "If |
Svelte 3.40.0 should now be using the simpler versions of a few internal helpers that don't support hydration if you didn't compile with |
Describe the bug
First off, thank you for maintaining Svelte. It's one of my favorite JavaScript frameworks for its ease-of-use, small bundle size, and runtime performance.
Unfortunately it seems that the baseline bundle size has increased significantly in recent versions. I wrote a small repro using Rollup, rollup-plugin-svelte, and the Hello World example from the REPL. Here are the bundle sizes reported by bundlesize for recent Svelte versions:
Here is a diff of the JavaScript bundle:
Click to see diff
Most of the size increase seems to have come from 10e3e3d and 04bc37d, which are related to hydration.
I'm not completely sure, but it seems like potentially this new code could be omitted for components compiled with
hydratable: false
? This would help a lot for use cases like mine, where I'm distributing a small standalone web component built with Svelte, with no SSR or hydration needed, and I'd ideally like it to be as small as possible.Thank you in advance for considering this potential performance improvement!
Reproduction
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: