There are currently two issues with Makefile which prevent it from being parallelizable:
For example if I do:
$ make -j2 build build-controller-binary push-controller-image
It will likely fail or be incorrect (because build and push will be running in parallel, it will either fail to push or push a previous version). A fix for this is to add a dependency on build to push. There are all kinds of issues like that in the Makefile.
Ideally I should be able to say export MAKEFLAGS="-j 4" in my ~/.bashrc and my builds would be magically faster, but still correct regardless of targets that I specify.
build-agones-sdk-binary) are sequential, and pretty slow (in particular when building on macOS, which has horrible filesystem mount performance). They might benefit from being broken into smaller pieces which can run in paralllel.I can work on fixing that.
Also I discovered that we're not using any go build caching, which kills interactive (re)build performance. Will send a PR which fixes that...
Also I discovered that we're not using any go build caching, which kills interactive (re)build performance. Will send a PR which fixes that...
YEESSSS - I've wanted this for a while, but never got around to it! :man_cartwheeling:
Some targets (e.g. build-agones-sdk-binary) are sequential, and pretty slow (in particular when building on macOS, which has horrible filesystem mount performance). They might benefit from being broken into smaller pieces which can run in paralllel.
YES ! building on macOS is slow.
It looks like building agones on Linux still has problems when building with -j. Is there any bug tracking this issue?
Most helpful comment
I can work on fixing that.
Also I discovered that we're not using any go build caching, which kills interactive (re)build performance. Will send a PR which fixes that...