Speed up colcon build with ccache

asked 2022-09-28 09:16:48 -0500

yashi gravatar image

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?

edit retag flag offensive close merge delete

Comments

There is a mixin for ccache: https://github.com/colcon/colcon-mixi...

yashi gravatar image yashi  ( 2022-10-06 20:11:09 -0500 )edit