Exploring build performance

Mentioning here for exposure, I just wrote a brief article on how to gain some insight into your build performance. If you’re using the Ninja generator in your CMake project, there’s some easy steps to getting some really useful data. Even more detailed data is available if you are using Clang as your compiler.

The article is meant as a starting point and includes some raw and processed data so you can start exploring right away without having your own build. One of the data sets is for building CMake itself on a 2021 M1 Max MacBook Pro.


It’s frequently not the lengthiest part of the build, but given this is a CMake forum, I thought I’d be nice to add that it’s also very easy to profile the configuration stage of your build by passing the --profiling-format=google-trace and --profiling-output=cmake-configuration-stage-profiling-data.json flags to your cmake command.


D’oh! Yes, an obvious omission from the article. I should add a section for that, thanks for pointing this out. Will try to get around to that after the CMake 3.24 release is dealt with.