Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Ninja is an alternative to make that can resolve dependencies much faster. If there is nothing to build, ninja returns almost instantaneously where make can take 10+ secondsThis 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).

Code Block
languagebash
# Install the ninja package (this example works on Ubuntu)
sudo apt-get install ninja-build

# Instead of ./buildall.sh ...:
./buildall.sh ... -ninja

# Instead of make -j ${IMPALA_BUILD_THREADS} <targets>:
ninja -j ${IMPALA_BUILD_THREADS} <targets>

# You can use an alias to make ninja use IMPALA_BUILD_THREADS by default
alias ninja='ninja -j ${IMPALA_BUILD_THREADS}'

Skip toolchain bootstrapping

Bootstrapping the toolchain and python dependencies can add latency to buildall.sh invocations even if nothing needs to be downloaded. You can disable this by setting SKIP_TOOLCHAIN_BOOTSTRAP=true in bin/impala-config-local.sh. Note that this means you need to manually set SKIP_TOOLCHAIN_BOOTSTRAP=false when running buildall.sh to download dependencies when they do change.

Using distcc

The instructions for using distcc are in bin/distcc/README.md