Re: vc++ mfc project build is extremely slow taking hours



How large is the source? Anything less than 100,000 lines should compile in under a
minute under normal circumstances.

How sophisticated are the "third party" libraries. Complex template processing can result
in slower compilation, but not an hour.

Are you using precompiled headers? If you aren't, there is no reason to expect fast
compilations.

Given the third-party libraries are likely to be very stable, they should be #included in
stdafx.h so they are part of the precompiled header.

How fast is your network and file server?

If you have "declared several environment variables", which ones, and what are the values?
Long search paths for include directories, especially if they have to be searched
individually over a slow network or to a slow server, will have severe impact on your
compilation speed.

Do the third-party libraries have #pragma once in the header files, or just
include-guards? #pragma once will significantly improve performance.

There is far too little information here to actually diagnose the problem, but any
compilation taking more than a few minutes has serious problems; the key is to figure out
why. I'd suggest doing a build with all the files on a local machine and see if there is
any change in speed.

Try using a tool like diskperf to measure actual time delays in getting to the files.

I become annoyed if a build takes longer than 30 seconds. If yours is taking a hour, you
have a significant problem, but there is no way to figure out what it is from the little
information provided here.
joe

On Fri, 9 May 2008 00:51:02 -0700 (PDT), dwaach <xbhishek.xsthxnx@xxxxxxxxx> wrote:

Hi,

I have a vc++ 2002.NET MFC console exe project and it accesses a lot
of 3rd party headers and libraries available on a network machine \
\dataread. Now, I do connect to that machine by Start->Run->\\dataread
and entering user/pwd. Further I have declared several environment
variables which are used in the Visual Studio project.

The project build is extremely slow. I do not understand why ? It
takes soe over 1 hour.

Any help please appreciarted.

Thanks,
Abhishek
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: pgm object/source comparison
    ... There may be plenty of reasons why compilation fails, ... ILE, like default activation groups, objects ... I moved the libraries, files and ... >>> seems fairly obvious that the source code in those two don't match ...
    (comp.sys.ibm.as400.misc)
  • Re: vc++ mfc project build is extremely slow taking hours
    ... How sophisticated are the "third party" libraries. ... in slower compilation, but not an hour. ... How fast is your network and file server? ... I am using precompiled headers and the environment variables point to ...
    (microsoft.public.vc.mfc)
  • RE: Office 2007 "__missing_type__" while importing msword.olb
    ... the type library contains a reference to another type ... Because importing Office 2007 type ... libraries on a system with Office 2003 is not a supported behavior, ... the compilation directly, or fail in the first run, but pass in the second, ...
    (microsoft.public.office.developer.com.add_ins)
  • Re: Enlightnement
    ... > command line and do not have a book on Linux. ... it is good to see a new user leap right into compilation. ... make install ... the system know what libraries are available and where. ...
    (comp.os.linux.setup)
  • Re: Stack frames
    ... in order to save from no end Compilation ... Fast assemblers (RosAsm included) work great ... libraries, as it is practically impossible to do a large ... the only assembler anyone is trying to push as a serious ...
    (alt.lang.asm)

Loading