Get the latest tech news
Analyzing Go Build Times (2023)
Go is often praised for its fast build times. While they are pretty quick, they are slow enough that I spend a lot of time waiting for them, enough that it prompted me to go down the rabbit hole of thoroughly analyzing them. This post covers all aspects of what makes Go builds fast or slow. Throughout this blog, we will use Istio as an example of real-world codebase. For reference on its size:
While they are pretty quick, they are slow enough that I spend a lot of time waiting for them, enough that it prompted me to go down the rabbit hole of thoroughly analyzing them. I was also interested if setting GOMAXPROCS would be helpful here -- this defaults to the number of processors the machine has, but is not aware of cgroup limits, such as the ones docker is imposing. Removing this file drops the compile time for go-control-plane to 15s (there is still a decent amount of the library imported through core usage).
Or read this on Hacker News