News for hackers. Stuff that matters.
Re:Go 1.15 Released by mholt on Tuesday August 11, 2020 @06:16PM (#24126664)
Caddy binaries on Linux shrink by ~2.5 MB with Go 1.15! (~33 MB down to ~31 MB)

3 MB savings on Mac, and 2 MB on Windows: https://github.com/caddyserver/caddy/pull/3642#issuecomment-...

So about 8-10% reduction.

Re:Go 1.15 Released by sagichmal on Tuesday August 11, 2020 @06:28PM (#24126744)
I'm so confused by this. Given the context that Go primarily targets, which is daemon services running on server class machines, binary size, so long as it's not totally absurd, is almost completely irrelevant. Is it like a code golf thing? Why do you care?
Re:Go 1.15 Released by taywrobel on Tuesday August 11, 2020 @06:32PM (#24126777)
Given that modern systems include containerization and dozens or hundreds of instances of applications bouncing continually as changes are made or network conditions change, deployment has gotten a lot more “chatty” than tossing a binary on a server and running it.

Reducing binary size makes a difference when the app is deployed to remote servers thousands of times under normal operation.

Storage and bandwidth is cheap, yes, but it adds up.

Re:Go 1.15 Released by closeparen on Tuesday August 11, 2020 @07:45PM (#24127247)
My company runs Go and Java programs that locally compile in seconds to binaries / JARs that weigh tens of megabytes. But for production, we insist on spending tens of minutes building and copying around Docker containers that weigh gigabytes.
Re:Go 1.15 Released by mholt on Tuesday August 11, 2020 @06:32PM (#24126780)
You're right. But, leaner binaries are a good sign of a mature compiler & linker.
Re:Go 1.15 Released by ainar-g on Tuesday August 11, 2020 @06:34PM (#24126793)
You forgot that another common use for Go is command-line utilities. And there the file size can be important.
Re:Go 1.15 Released by temp667 on Tuesday August 11, 2020 @07:30PM (#24127149)
It targets a broader set of items then that (I'd describe as static type, GC, fast to compile / run language?).

I've noticed the issue of big deploy sizes with docker including with interpreted and other big package languages (Java can haul around a ton + JVM etc). It's somewhat hard to get small container sizes even for a simple hello world program with these approaches.

Folks are doing 15MB docker images for Go. Google likes really stripped down things (low attack surface etc) - see their distroless initiative.

Re:Go 1.15 Released by cle on Tuesday August 11, 2020 @07:19PM (#24127085)
These days, server-class machines are often ephemeral and spun up-and-down based on demand. At work, I operate services that have 2 GB of Java code packages, and others that use a single 10 MB Go binary. Guess which one can scale up much more quickly to handle increased demand?
Re:Go 1.15 Released by pjmlp on Wednesday August 12, 2020 @02:42AM (#24129188)
Apparently it is time to learn how to use Java linker.
Re:Go 1.15 Released by wokwokwok on Tuesday August 11, 2020 @07:42PM (#24127228)
Obviously.

...but the point being made is at 10% reduction, a 9MB and a 10MB binary are indistinguishable.

They scale almost identically.

so... it seems a bit like premature optimisation to devote such a large amount of effort to what appears to be a win that affects virtually no one except those few (FANG) who deploy to thousands of services daily.

Re:Go 1.15 Released by eadan on Wednesday August 12, 2020 @04:23AM (#24129707)
I think the fact that binary size has become smaller rather than larger is notable in a world where most other software seems to be increasingly more resource hungry.