Hacker News new | ask | show | jobs
by tiddles 309 days ago
Nice, I’ve been looking for something like this for a while.

I’ve noticed on my huge catkin cmake project that cmake is checking the existence of the same files hundreds of times too. Is there anything that can hook into fork() and provide a cached value after the first invocation?

2 comments

My tips for speeding up builds (from making this same project but with ebpf):

- switch to ninja to avoid that exact issue since CMake + Make spawns a subprocess for every directory (use the binary from PyPi for jobserver integration)

- catkin as in ROS? rm /opt/ros/noetic/etc/catkin/profile.d/99.roslisp.sh to remove 2 python spawns per package

You could try ccache with the CCACHE_SLOPPINESS=file_stat_matches option, or implement a filesystem-level caching proxy like CachingFS or FUSE-based solutions that intercept and cache those redundant stat() calls.