Reduced compilation time

Asked 2 years ago, Updated 2 years ago, 103 views

We are currently maintaining a relatively large internal C++ project, but with the use of boost and template metaprogramming, we are experiencing a situation where compilation time is increased and operational efficiency decreases significantly.
There are many ways to reduce header dependencies, use pch, and other compilation times, but please let me know if you have the option to obtain profilers and statistics for the compilation process as a guide to what bottlenecks exist.

Your environment is
Windows 7 visual studio 2015 professional edition sp3
That's it.

Thank you for your cooperation.

c++ visual-studio build

2022-09-30 19:03

2 Answers

Private compilation option link options are available.

cl.exe/Bt
link.exe /time

You can use the to determine how long it takes.This is only a private option, so please try it after recognizing the possibility of changing the specifications in the future.

Please recommend a few things

  • Skipping Header File Analysis with PCH
  • Parallel compilation of .cpp files with the /MP option
  • /Zc:inlineOption Remove debug symbols that are deployed inline and are no longer needed


2022-09-30 19:03

I'm sorry, but the account registration process seems to have failed, and the email address at the time of the question was linked to another ID (this ID), so I couldn't access the account in question.Generally speaking, it is difficult to consolidate accounts.

With regard to the above questions, I understand from the compilation options you gave me that almost all the time is spent on LINK.Using that information as a clue, we reached the following page:
https://blogs.msdn.microsoft.com/vcblog/2013/10/29/the-visual-c-linker-best-practices-developer-iteration/
Using the 64-bit toolset during a 32-bit build significantly reduced link time (more than boost or template, it seems that there was not enough memory for code size augmentation).


2022-09-30 19:03

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.