• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 472
  • Last Modified:

reducing build and link time

I have a general question

I have a big solution containing 22 projects...its MFC application with lots of dialog boxes, it handles audio calls n stuff...

please give me tips to reduce the build and link time....
0
kuchnaheen
Asked:
kuchnaheen
  • 2
1 Solution
 
AxterCommented:
22 projects is not that big.

Are you doing full rebuilds?

It shouldn't take that long to do an incremental build, unless  you're making header changes.
0
 
AxterCommented:
You can use the pimpl design pattern to avoid header changes.
http://www.codeproject.com/useritems/PIMPL.asp?df=100&forumid=383233&exp=0&select=1891437


Another solution, if you have the money and extra build machines, is to use IncrediBuild.
See following link:
http://www.xoreax.com/main.htm
0
 
itsmeandnobodyelseCommented:
Are you using precompiled header files? If no, you might consider putting WINAPI and MFC headers into stdafx.h and create a stdafx.cpp which only includes stdafx.h. The stdafx.cpp needs to be included in your project and must be get the option (in C++ - Precompiled Header settings) that it should *create* the Precompiled Header File. Then set the project(s) to 'Using PCH thru stdafx.h" and add a '#include stdafx.h' at the top of each cpp file. Using PCH can increase your compile times significantly, especially when making a full rebuild. If you are using PCH already you may consider to add some of your big header files to stdafx.h. Especially if you are using 3rd-party libraries where the header files rarely are changing, you could add all these includes to stdafx.h. You should *not* add header files which are changing frequently, e. g. resource headers, cause that is contra-productive. Changing a header of the PCH leads to a full rebuild for all. Never add a template header to PCH cause a template header needs to compiled for each instance.

Regards, Alex
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now