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

misc/wasm: importing fmt adds ~500kb to the binary #29478

Closed
OneOfOne opened this issue Dec 31, 2018 · 3 comments
Closed

misc/wasm: importing fmt adds ~500kb to the binary #29478

OneOfOne opened this issue Dec 31, 2018 · 3 comments
Labels
arch-wasm WebAssembly issues binary-size FeatureRequest FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@OneOfOne
Copy link
Contributor

What version of Go are you using (go version)?

$ go version
go version devel +bfaf11c158 2018-12-26 05:21:41 +0000 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ GOOS=js GOARCH=wasm go env                                              
GOARCH="wasm"
GOBIN="/home/oneofone/code/go/bin"
GOCACHE="/tmp/.gocache"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="js"
GOPATH="/home/oneofone/code/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/src/go"
GOTMPDIR=""
GOTOOLDIR="/usr/src/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="0"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build733631578=/tmp/go-build -gno-record-gcc-switches"

This isn't a bug per-se, but I think maybe something can be done to improve that.

Feel free to close it or keep it as a reminder for later.

@katiehockman katiehockman added the arch-wasm WebAssembly issues label Jan 2, 2019
@katiehockman katiehockman added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 2, 2019
@katiehockman katiehockman added this to the Unplanned milestone Jan 2, 2019
@neelance
Copy link
Member

neelance commented Jan 6, 2019

I fully agree that the binary sizes are large measured by current web standards. So far, binary size hasn't been one of the main concerns of Go due to the main use cases it currently has. With WebAssembly this changes and we will see how much influence this will have on Go in the future.

#6853 already covers this issue and I don't see anything immediate we can do specifically for WebAssembly, so let's close this as a duplicate.

Also please always look at the size difference with gzip applied, since this is the only size that really matters. With gzip, a quick experiment shows for me a difference of 1.1MB non-gzipped, but only 230KB gzipped.

@neelance neelance closed this as completed Jan 6, 2019
@techtonik
Copy link

techtonik commented Jan 8, 2019

#6853 is CFC. 230Kb gzipped is still big. How much is it in memory when running on web page context?

@neelance
Copy link
Member

neelance commented Jan 9, 2019

For memory related issues see #27462

@golang golang locked and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly issues binary-size FeatureRequest FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants