Skip to content

File compilations

MetanoKid edited this page Jun 25, 2020 · 4 revisions

In this page we'll explore which info you can get from the FileCompilations.csv report.

If we were to check the sample file provided in the repo we would find something like this:

File path Compilation time (nanoseconds) Front-end time (nanoseconds) Back-end time (nanoseconds)
Z:\cpp-build-analyzer\src\AnalysisData\PCH\PCH.cpp 4035975177 3614262478 417985905
Z:\cpp-build-analyzer\src\ConsoleMain\Main.cpp 3602724936 2836736219 763003341
Z:\cpp-build-analyzer\src\AnalysisData\BuildTimeline\ProcessIdThreadIdRecalculation.cpp 2166607961 1785316071 377809361
Z:\cpp-build-analyzer\src\AnalysisData\BuildTimeline\BuildTimeline.cpp 2145867561 1527007144 609891152
... ... ... ...

There's a little caveat to the Compilation time column: it measures the time it takes from the start of the front-end phase to the end of the back-end phase:

Total compilation time

Rule of thumb

Front-end times have a bigger impact on total compilation times than back-end times. Check for outliers!

What now?

Say you've found some file that takes a lot of seconds to get compiled.

  • Are front-end times large? Maybe you're including stuff you don't need.
  • Are back-end times large? Maybe you end up compiling some expensive functions over and over.
Clone this wiki locally