'Build time optimization C++ Microsoft Visual Studio 2022
I am trying to optimize my build time. I have relatively small project and I placed majority of headers into a precompiled header.
Nevertheless in build log I have 7000 functions that are rebuilt every time. I am wondering where they come from. Maximum I have 100 functions, no templates, therefore I would like to ask what can take extra time to compile and where those 7000 come from?
Every time I add a new function the compilation times increases from 4 seconds to 8 seconds. If I just change existing variable or add new variable inside function the time is again 4 seconds.
This is what I see as the main change after new code is added:
1> Previous IPDB and IOBJ mismatch, fall back to full compilation.
1> All 7005 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
Is there a possibility to print header names where those functions coming from?
Build started...
1>------ Build started: Project: joinery_solver_viewer, Configuration: Release x64 ------
1>Build started 5/7/2022 11:11:55 PM.
1>Target InitializeBuildStatus:
1> Creating "x64\Release\joinery_.a924c778.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
1>Target ClCompile:
1> All outputs are up-to-date.
1> joinery_solver_viewer.cpp
1>Target Link:
1> Generating code
1> 0 of 7005 functions ( 0.0%) were compiled, the rest were copied from previous compilation.
1> 0 functions were new in current compilation
1> 0 functions had inline decision re-evaluated but remain unchanged
1> Finished generating code
1> joinery_solver_viewer.vcxproj -> C:\IBOIS57\_Code\Software\Python\compas_wood\net\x64\Release\joinery_solver_viewer.exe
1>Target FinalizeBuildStatus:
1> Deleting file "x64\Release\joinery_.a924c778.tlog\unsuccessfulbuild".
1> Touching "x64\Release\joinery_.a924c778.tlog\joinery_solver_viewer.lastbuildstate".
1>
1>Build succeeded.
1> 0 Warning(s)
1> 0 Error(s)
1>
1>Time Elapsed 00:00:03.99
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

