> Every time, 70% of a couple hundred megabytes are copied around for no good reason and someone needs to pay ingress/egress networking costs for these file copies. That is quite some money being burned for no good reason! Meanwhile half of the world is pushing images by nvidia, intel and amd around for their machine learning software: Intel OneAPI runtime libraries: 4.74GB (or 18.4GB for compilers) CUDA runtime libr…
My Go executable files are still getting larger
31–40 of 174 posts
Re: My Go executable files are still getting larger
#32Just zero them out and they'll compress to nothing. Even better, with a sparse file aware tool like tar, they won't even use disk space.
Re: My Go executable files are still getting larger
#33Earlier quoted context omitted.
It affects the download and instantiation time for containers.
The article says they don't really care about initialization time though, which is right. Remember: cockroachdb is always synchronizing data across the cluster, that 175mb of ingress to start up a DB node, probably pales in comparison to data synchronization/relocations that happen on a cluster. Which is why worrying about ingress/egress costs over binary size is nonsense here too. The bandwidth you need to run a dis…
In the end this all ends up because it is for all go binaries. I’ve come appreciate attention for leanness because in the end it does add up.
Re: My Go executable files are still getting larger
#34Does anyone have a source for this? As it still appears to be there
- Go 1.15 https://i.imgur.com/3YlZGOk.png
- Go 1.16 https://i.imgur.com/gGYsj32.png
Re: My Go executable files are still getting larger
#35It is a very annoying thing for a C++ programmer, which can dynamically link operating system libraries at will.
Re: My Go executable files are still getting larger
#36I always wonder if this is the flip side of the fast compilation? It would be nice to be able to decide on those trade-offs ourselves. I mostly write web servers in Go, which (as the article says) are executed rarely, so init time really doesn't matter to me. But I've been looking at writing some desktop apps in Go, and then init time will matter.
> I mostly write web servers in Go, which (as the article says) are executed rarely, so init time really doesn't matter to me. Presumably a few mb of disk usage also doesn't matter then? I also write web services, but I do care about the init time precisely because I want to be deployments to take as little time as possible so that we can deploy (and rollback) many times per day with relatively simple automation. Tha…
Re: My Go executable files are still getting larger
#37I always wonder if this is the flip side of the fast compilation? It would be nice to be able to decide on those trade-offs ourselves. I mostly write web servers in Go, which (as the article says) are executed rarely, so init time really doesn't matter to me. But I've been looking at writing some desktop apps in Go, and then init time will matter.
> I mostly write web servers in Go, which (as the article says) are executed rarely, so init time really doesn't matter to me. Presumably a few mb of disk usage also doesn't matter then? I also write web services, but I do care about the init time precisely because I want to be deployments to take as little time as possible so that we can deploy (and rollback) many times per day with relatively simple automation. Tha…
I don't use Docker to deploy, because it's just a single executable file (and a bunch of templates, though I'm looking at embedding those). One of the reasons I'm reluctant to go down the Docker road is because it's going to add more time to my deployment.
Re: My Go executable files are still getting larger
#38I always wonder if this is the flip side of the fast compilation? It would be nice to be able to decide on those trade-offs ourselves. I mostly write web servers in Go, which (as the article says) are executed rarely, so init time really doesn't matter to me. But I've been looking at writing some desktop apps in Go, and then init time will matter.
Fast compilation is great for development and testing. Both local and in CI.
But if there some flags to tell the compiler to compile slowly and produce a smaller executable, that would be awesome for final builds that need to be shipped across the internet.
Re: My Go executable files are still getting larger
#39Go static linking is a great happy idea for a Java guy trapped in the Classpath Dependency Hell (or C# / DLL Hell). It is a very annoying thing for a C++ programmer, which can dynamically link operating system libraries at will.
Re: My Go executable files are still getting larger
#40I always wonder if this is the flip side of the fast compilation? It would be nice to be able to decide on those trade-offs ourselves. I mostly write web servers in Go, which (as the article says) are executed rarely, so init time really doesn't matter to me. But I've been looking at writing some desktop apps in Go, and then init time will matter.
However, once you exceed the 10-20Mb regime, I seem to find more 20-200Mb Go bins in the wild. This can be misleading, since the Go world is a fan of packing assets into binaries, eg for web GUIs.
What dings Go bins on init time is the Go runtime. Still, it's rarely noticeable unless you are firing thousands of times a second.