1 calls
04.295 seconds
Submodules:
1> 141 ms MSBuild 16 calls
1> 775 ms SetModuleDependencies 10 calls
1> 1015 ms CL 2 calls
1> 1132 ms MultiToolTask 1 calls
03.427 seconds
The CL entry is for cpp files and it's 4.39x as fast as header-based. Great!
But it's the ixx dependency scanning and compilation (MultiToolTask) that brings things down. Things that aren't there with header-based.
MultiToolTask *is* parallelised though. Reducing thread count slows it down. And you can open up the msbuild binlog in the msbuild log viewer to see the parallelisation of ixx compilation. See which modules are on the end of the DAG slowing things down.
So, I don't know how MultiToolTask could be sped up, but, msbuild seems to be waiting for all ixx files before moving onto cpp files, so that's some parallelism left on the table.
Detailed timings of App:
Header-based, app pch:
1> 196 ms MSBuild 13 calls
1> 1000 ms Link 1 calls
1> 23270 ms CL 16 calls
24.708 seconds
Extlib modules + CommonStuff submodules:
1> 199 ms SetModuleDependencies 18 calls
1> 606 ms MSBuild 27 calls
1> 1197 ms Link 1 calls
1> 21877 ms CL 15 calls
24.078 seconds
Full submodules:
1> 459 ms MSBuild 27 calls
1> 1324 ms Link 1 calls
1> 4646 ms SetModuleDependencies 18 calls
1> 12593 ms MultiToolTask 1 calls
1> 49327 ms CL 15 calls
01:09.245 minutes
Slow. But looking at the log viewer, ixx compilation seems very well parallelised.
And 4.6s just to scan for dependencies. VS isn't launching a whole CL process for each file is it?
Also, why does CL take so long? All modules have been compiled by that point, so why would it be much slower?
Recompiling a single file from App:
Header-based, no pch:
1> 46 ms SetModuleDependencies 10 calls
1> 120 ms MSBuild 5 calls
1> 3757 ms CL 1 calls
04.095 seconds
Header-based, app pch:
1> 56 ms SetModuleDependencies 10 calls
1> 121 ms MSBuild 5 calls
1> 1793 ms CL 2 calls
02.059 seconds
Extlib + CommonStuff modules (as submodules):
1> 121 ms SetModuleDependencies 18 calls
1> 216 ms MSBuild 17 calls
1> 1793 ms CL 1 calls
02.162 seconds
Full submodules, except app:
1> 518 ms MSBuild 17 calls
1> 631 ms SetModuleDependencies 18 calls
1> 2211 ms CL 1 calls
03.095 seconds
Full submodules:
1> 559 ms MSBuild 17 calls
1> 696 ms SetModuleDependencies 18 calls
1> 1891 ms MultiToolTask 1 calls
1> 3221 ms CL 1 calls
06.331 seconds
That MultiToolTask is quite slow, checking that all the modules in the project are up to date it seems. Does it have to be this slow?
"CL.exe will run on 0 out of 224 file(s) in 224 batches. Startup
Post #25696
12