Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upx/build/cmd/release: reduce Go download sizes #27151
Comments
bradfitz
added this to the Go1.12 milestone
Aug 22, 2018
gopherbot
added
the
Builders
label
Aug 22, 2018
bradfitz
added
NeedsFix
and removed
Builders
labels
Aug 22, 2018
gopherbot
added
the
Builders
label
Aug 22, 2018
This comment has been minimized.
This comment has been minimized.
|
Untarring the release and gzip-compressing each file before doing du stats gives a reasonable way to measure the cost of removing bits:
Here are the top directories:
Biggest binaries:
We have 6.6 MB of testdata:
|
This comment has been minimized.
This comment has been minimized.
|
We ship three copies of Mark Twain's Tom Sawyer?
|
This comment has been minimized.
This comment has been minimized.
|
About the pkg files that get rebuilt, a common issue in the past has been users not having write permissions on the system GOROOT, hence breaking or rebuilding every time. Will that be a problem? |
This comment has been minimized.
This comment has been minimized.
|
@FiloSottile, that hasn't been a problem since at least Go 1.10. It writes to the build cache instead. You can experiment with the Dockerfile linked above. |
This comment has been minimized.
This comment has been minimized.
Currently we ship the tour so one can do This is all quite convoluted and I've seen reports of people confused by this. If we remove the tour from the binary releases we will also be able to simplify our instructions for running it locally: it's always "go get it, and then run the |
This comment has been minimized.
This comment has been minimized.
|
In that case I would like to remove the tour, maybe even for Go 1.11. |
This comment has been minimized.
This comment has been minimized.
|
/cc @katiehockman |
This comment has been minimized.
This comment has been minimized.
gopherbot
commented
Aug 24, 2018
|
Change https://golang.org/cl/131156 mentions this issue: |
pushed a commit
to golang/build
that referenced
this issue
Aug 24, 2018
golang
deleted a comment from
networkimprov
Aug 26, 2018
This comment has been minimized.
This comment has been minimized.
gopherbot
commented
Sep 14, 2018
|
Change https://golang.org/cl/135495 mentions this issue: |
pushed a commit
that referenced
this issue
Sep 24, 2018
This comment has been minimized.
This comment has been minimized.
gopherbot
commented
Sep 28, 2018
|
Change https://golang.org/cl/138495 mentions this issue: |
pushed a commit
that referenced
this issue
Sep 28, 2018
This comment has been minimized.
This comment has been minimized.
gopherbot
commented
Oct 1, 2018
|
Change https://golang.org/cl/138737 mentions this issue: |
pushed a commit
that referenced
this issue
Oct 1, 2018
This comment has been minimized.
This comment has been minimized.
gopherbot
commented
Oct 19, 2018
|
Change https://golang.org/cl/143537 mentions this issue: |
This comment has been minimized.
This comment has been minimized.
|
Now that the tour is removed from cmd/release (for Go 1.12), and CLI support is removed from godoc so it's only a webserver, is there any value in shipping the godoc webserver with releases? I think we should remove it and trim the size of releases further. Anybody wants to read the docs offline can /cc @andybons @katiehockman @ianlancetaylor @FiloSottile @bcmills |
This comment has been minimized.
This comment has been minimized.
|
(Braindump about whether we make "lite" releases.... I'm leaning towards no) We currently ship 15 downloads with releases at https://golang.org/dl/ ....
The binary archives take about 112MB compressed, 329MB extracted (linux-amd64 sizes). People sometimes complain that these are too large, and they've been growing over time. (See meta bug #27151) One thing we could do is ship "lite" versions without:
Maybe also:
It looks like we could halve the sizes of the downloads. (compressed & on-disk) The question is whether we want to. If we had "lite" versions, who is their intended audience? If it's CI users doing builds in loops rather than humans, then one might counter argue that they'd benefit from pre-built *.a files (for faster builds) and the bandwidth isn't a concern for a cloud-connected CI system. If it's for people building Docker images, one could counter argue that multi-stage Dockerfiles solve the problem: you should build your application in some heavy stage, then copy your final binary to a small image. |
This comment has been minimized.
This comment has been minimized.
|
Go for it. I have no issue as long as there's a path to having offline docs (which one can get through |
pushed a commit
to golang/build
that referenced
this issue
Oct 24, 2018
This comment has been minimized.
This comment has been minimized.
gopherbot
commented
Oct 24, 2018
|
Change https://golang.org/cl/144281 mentions this issue: |
pushed a commit
to golang/build
that referenced
this issue
Oct 24, 2018
andybons
referenced this issue
Dec 13, 2018
Open
doc, x/tools/cmd/godoc: move golang.org content into its own repository #29206
bcmills
referenced this issue
Jan 30, 2019
Open
path/filepath: TestBug3486 fails if GOROOT/test is removed #29713
This comment has been minimized.
This comment has been minimized.
darkfeline
commented
Jan 30, 2019
|
Per #29713, does it make sense to omit the |
This comment has been minimized.
This comment has been minimized.
|
@darkfeline, if there are some users who don't want to be able to run tests, yes. See discussion above about "lite" builds and who their audience might be. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Foxboron
commented
Jan 30, 2019
This comment was marked as off-topic.
This comment was marked as off-topic.
|
We don't close Arch or other downstream bug reports. They can do whatever they'd like. They can ask for help if they need it or have questions, though. |
This comment has been minimized.
This comment has been minimized.
This sounds reasonable to me. There's a minor anticipated benefit of doing this. I expect that @bradfitz This hasn't happened by now. Is it too late for 1.12 now? |
bradfitz
referenced this issue
Jan 31, 2019
Open
proposal: x/build/cmd/release: remove godoc for Go 1.13 #30029
This comment has been minimized.
This comment has been minimized.
This comment was marked as off-topic.
This comment was marked as off-topic.
Foxboron
commented
Jan 31, 2019
|
@bradfitz I commented on the wrong issue :/ sorry about that. |
bradfitz commentedAug 22, 2018
•
edited
Go1's source download was 11 MB.
Go 1.11rc1's source download is 20MB.
Go 1.4.3's Linux download was 58 MB.
Go 1.11rc1's Linux download was 169 MB.
Clearly 169 MB is pretty ridiculous.
https://go-review.googlesource.com/c/build/+/129955 removed some useless *.a files to save 20 MB.
https://go-review.googlesource.com/c/build/+/130575 removed the blog to save 34MB.
We're now down to 116 MB for what will be the Go 1.11rc2 Linux download. Better, but not great.
This is a tracking bug for further improvements.
/cc @ianlancetaylor @andybons @dmitshur