-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
go-ipfs binary is too large #1855
Comments
what is being removed? Go's binaries are large because they are statically compiled. I assume that all of that space is code, and I was also under the assumption that the compiler removed unused code. I'm skeptical that you can get such a reduction in size without any adverse side effects. |
I suspect there's a ton from debugging symbols. — On Sun, Oct 18, 2015 at 10:31 AM, Caio Alonso notifications@github.com
|
well if we remove those, then all the panics will be illegible and useless for debugging anything. (if that is in fact whats taking up all the space) |
@whyrusleeping there's some discussion about this here: golang/go#6853 |
Wow, that's some weird copyright header! https://github.com/pwaller/goupx/blob/master/hemfix/hemfix.go All rights reserved, based on code found somewhere, and GPL! :) |
I close it as #2097 is more developed. The goupx is no longer needed in case of Go1.6 |
Seeing as we are gearing up towards self-hosting releases and autoupdating them, I think it would be interesting to reduce the
ipfs
binary size.Go is not compatible by default with upx, but https://github.com/pwaller/goupx fixes that. Maybe we could use it?
A preliminary test with the code in master gives me a 75% reduction in binary size:
And using the
--strip-binary
option, even more:The text was updated successfully, but these errors were encountered: