Comment

Comment by oefrha

One problem with golang's wasm target is that the generated binary is huge. For instance, I checked app.wasm of this documentation site and the four examples listed at https://go-app.dev/built-with:

0. This site: 14.9MB, 3.4MB gzipped;

1. 13.5MB, 3.2MB gzipped;

2. 15.4MB, 3.2MB gzipped;

3. 4.7MB, 1.2MB gzipped (this is an extremely bare bones demo);

4. 25.0MB, 5.4MB gzipped.

You can save a bit more with brotli, but not much more. I built an app with golang wasm last year, but ended up rewriting everything in good old TS since I couldn't justify the ~15MB raw, ~2.7MB brotli'ed payload.

I guess you can make some huge savings if tinygo has enough capabilities to cover all your needs. Not sure if it's possible with this library, but if it is, they certainly haven't explored it, hence the 3.4MB gzipped wasm for a documentation site.

parent oefrha 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton