I tend to write rather large templated header-only C++ libraries and my users commonly complain about compilation times. After thinking about the matter, it occurred to me t
There's a tool from the Boost project, which could be useful for pretty much any compiler and build system.
The tool requires source code instrumentation with TEMPLATE_PROFILE_ENTER()
and TEMPLATE_PROFILE_EXIT()
macro calls. These macros then generate specific diagnostics (warnings) at compile-time, which are timed and collected along with instantiation callstacks (which consequently allow building and visualizing callgraphs) by a script. Not bad, IMO.
I didn't use it yet though.