Compile time tracing (-ftime-trace)

If you work on reasonably big projects that take a while to build, I strongly recommend reading this blog post if you haven’t discovered chrome::tracing and -ftime-trace

https://aras-p.info/blog/2019/01/16/time-trace-timeline-flame-chart-profiler-for-Clang/

Which explains how to get a nice graph showing which bits of your code are taking a while to compile. I’ve just managed to drop one of our plugins build times by about 35% by removing JuceHeader.h everywhere and then using -ftime-trace as in the article and include-what-you-use to further nuke necessary includes.

Public service announcement over :slight_smile:

5 Likes