Comment

Comment by lukechu10

It's the gzipped size that matters a lot more. Also wasm is significantly faster to parse and run than Javascript so although 500kb seems like a lot for JS, for WASM it's not that much.

A general website will likely need a lot more data in the form of images and other media so all in all this is not too bad.

The reason why bundle size for JS is so important is that the browser needs to first download the JS, parse the JS, then JIT compile it before it can start running. For WASM on the other hand, the browser can in fact parse it while downloading in parallel and then run it almost immediately since WASM is much lower level. So for WASM the main bottleneck is downloading whereas JS, it is parsing and compiling.

parent lukechu10 7 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton