Speed up colcon build with ccache
Running two successive colcon build
on humble with ccache yields:
$ ccache -s
Summary:
Hits: 4742 / 7251 (65.40 %)
Direct: 4436 / 7263 (61.08 %)
Preprocessed: 306 / 2821 (10.85 %)
Misses: 2509
Direct: 2827
Preprocessed: 2515
Uncacheable: 4483
Primary storage:
Hits: 9178 / 14518 (63.22 %)
Misses: 5340
Cache size (GB): 1.13 / 5.00 (22.67 %)
And build times for this particulate runs[1] were:
Summary: 315 packages finished [19min 56s]
Summary: 315 packages finished [7min 38s]
Does anyone have better tips to build faster?
[1]: colcon build --symlink-install --cmake-args -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache --packages-skip-by-dep python_qt_binding
Asked by yashi on 2022-09-28 09:16:48 UTC
Comments
There is a mixin for ccache: https://github.com/colcon/colcon-mixin-repository/blob/master/ccache.mixin
Asked by yashi on 2022-10-06 20:11:09 UTC