Use the right build command to build only the things that changed:
Pass the right command line flags to skip unnecessary work:
- Add -notests to buildall.sh command to skip building backend tests
- Pass -noclean to buildall.sh if you don't need to do a full clean
Ccache - speeds up rebuilds when switching between branches
Ccache is a standard tool to accelerate C/C++ builds by caching previously-built object files. It can tremendously speed up builds when switching between branches of Impala.
Note: If you work on the same machine locally and remotely, make sure you use the same environment. ssh client can send through environment variables (and will do it by default for some, e.g. $LC_CTYPE), which is included by ccache for hashing and causes a cache miss even if the environment variable does not affect the build and the artifact is already cached.
For more information how to control the sent/received environment variables with ssh config: https://stackoverflow.com/questions/29609371/how-not-to-pass-the-locale-through-an-ssh-connection-command
Ninja - speeds up incremental builds
Ninja is an alternative to make that can resolve dependencies much faster. This can save 10+ seconds per invocation compared to make, which is significant for incremental builds (the difference in speed between ninja and make for full builds is minor compared to the end-to-end runtime of the build).
The instructions for using distcc are in bin/distcc/README.md
Skip checking toolchain dependencies (advanced only)
By default buildall.sh will check for toolchain and python package updates, which can add some time to buildall.sh invocations. You can disable this by adding this line to bin/impala-config-local.sh:
If you do this then you may run into build failures because of missing dependencies, and you will need to temporarily disable this optimisation or directly download the dependencies (e.g. by running bin/bootstrap_toolchain.py)