# Exploring build performance

**URL:** https://discourse.cmake.org/t/exploring-build-performance/5922
**Category:** Community
**Created:** [June 24, 2022, 12:05pm UTC](https://discourse.cmake.org/t/exploring-build-performance/5922 "2022-06-24T12:05:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [June 24, 2022, 12:05pm UTC](https://discourse.cmake.org/t/exploring-build-performance/5922/1 "2022-06-24T12:05:33Z")

</div>

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.

> **[Build Performance Insights](https://crascit.com/2022/06/24/build-performance-insights/)**
>
> A quick introduction to using Ninja, ninjatracing and Clang to gain detailed insights into the build performance of C++ projects.

---

<div class="post-metadata">

### Author: ![bvaldivielso](https://discourse.cmake.org/user_avatar/discourse.cmake.org/bvaldivielso/32/2551_2.png) [@bvaldivielso](https://discourse.cmake.org/u/bvaldivielso)
#### Post date: [June 29, 2022, 5:15pm UTC](https://discourse.cmake.org/t/exploring-build-performance/5922/2 "2022-06-29T17:15:49Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [June 30, 2022, 11:38am UTC](https://discourse.cmake.org/t/exploring-build-performance/5922/3 "2022-06-30T11:38:25Z")

</div>

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.
