Maybe of interest for other @gsoc_contributors as well.
For her openlibm project, we will be forced to build Octave from the configure step very often and want to save time were possible.
To my experience, an Octave build without ccache takes about 20 minutes, while with ccache about 5 minutes (sorry, I do not have accurate figures available now).
For debugging if ccache is properly used
ccache -s can be a good indicator:
cache directory /home/siko1056/.ccache primary config /home/siko1056/.ccache/ccache.conf secondary config (readonly) /etc/ccache.conf stats zero time Mon Mar 14 20:12:55 2022 cache hit (direct) 9073 cache hit (preprocessed) 1715 cache miss 14499 cache hit rate 42.66 % called for link 709 called for preprocessing 2000 compile failed 997 preprocessor error 671 bad compiler arguments 2404 autoconf compile/link 7610 no input file 387 cleanups performed 0 files in cache 34052 cache size 16.1 GB max cache size 20.0 GB
In my case 42 % of compilations are taken from the cache and have not to be actually be performed. For lower values, probably the cache is too small or other blockers might be in place.
Another time saver is using multiple threads
make -j4 (Parallel (GNU make)), where the number indicates the number of threads used (should match the number of real processor cores) for the build.
Do you have any other tricks to share?