How to speed up my compile times with VC 2003 ?

  • Thread starter Thread starter arkam
  • Start date Start date
A

arkam

Hi,

I have ported an application from Unix on Windows.

My problem are the compile times :

UNIX (2x450MHz / 512MB RAM)
Full compile with clean : 1h30

WINDOWS 2000 (P4 1.7GHz / 758MB RAM)
Full compile with clean : 2h58

I found that removing the Build Logging option in VC speed up my compile :

WINDOWS 2000 (P4 1.7GHz / 758MB RAM) without Build Logging
Full compile with clean : 1h45

I still can't explain why the C++ compiler is this slow !

Has someone a suggestion ?

Arkam
 
arkam said:
I still can't explain why the C++ compiler is this slow !

Has someone a suggestion ?

Do you use precompiled headers? Put all needed system headers in one
header file (even if you don't use them in all source files). This
file is usually called "stdafx.h", and if you create a MFC project
you'll find it, but it's not used for MFC only. There is a stdafx.cpp
also, but all it does is #include "stdafx.h".

So, replace all #include <> directives in all source files with one
"stdafx.h". This one #include must be the first directive in all
files, since everything before it will be ignored by compiler. Set
project option (of a sole PROJECT) to "Use precompiled headers", and
the same option of stdafx.cpp to "Create precompiled headers", and
rebuild the project... If you don't want some files to use this
feature set their option to "Not using precompiled headers".
 
Did you change any other option/setting etc. because I'm not seeing
even a 10% improvement with turning off build logging.
Thanks,
AP.
 
Back
Top