-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
all: unstripped binary size growth between Go 1.9 and 1.10 #23934
Comments
Is there a specific problem that you are pointing out here, or is this just about binaries still being too big? If what you're concerned about is the size of the debug info, perhaps you're after #11799. |
Not a specific problem I'm pointing out, just information for #6853, if that issue was opened I would've just commented there. This issue can be closed out thou. |
I believe that these old and generic issues tend to be moderated heavily because otherwise they get long really fast. Could you clarify what is the information you're trying to provide? Are the numbers that you posted above unexpected? |
Gotcha. Just the binary size difference from 1.9.4 to 1.10, obviously the sizes are still growing. Think that this is excepted but just wanted to give helpful information (hopefully) to anyone working on this issue of #6853. Sorry about the issue spam. :/ |
I see, thanks. Let's leave this issue open for now, in case I'm wrong about it being a duplicate of debug info compression. |
I'm pretty sure stripping binaries isn't supported as it creates a lot of instability. See: https://blog.filippo.io/shrink-your-go-binaries-with-this-one-weird-trick/ |
Stripping binaries should be safe. Any issues with stripped binaries is a bug. https://groups.google.com/forum/#!topic/golang-dev/ABppMOjYP6w |
from Go Forum |
@junland Thanks, I reported your data on the main issue. (Stripping is still a little controversial, but I think the consensus is that |
Awesome thanks @FiloSottile Just a side note I forgot to mention, these binaries were built on |
With go 1.11 binaries got even bigger. |
@dbaroncelli If you compile stripped binaries ( |
@ALTree thanks for the reply |
That's debatable. Anyway there's a proposal by Rob to not include debug info by default: #26074. It'll likely be discussed and decided upon in the next development cycle. |
Thanks @ALTree |
Can't seem to comment on issue #6853 , anyways I've ran some test's on binary size with a basic project using
net/http
and a couple ofstdlib
packages. Here are my results.Repo Source
Commands used:
Unstripped there is a
~8%
difference between 1.10 and 1.9.4 (1.9.x being slimmer than 1.10), however stripped there was a reduction in size in 1.10 but only about.23%
. Using UPX (Plus a stripped binary) I saw only1.28%
difference in size for both versions (It's out of scope but thought I would include the number.).Hope this gives some insight on binary sizes for this new release and future releases.
EDIT: Highlighted percentages.
The text was updated successfully, but these errors were encountered: