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



On May 9, 7:50 pm, Joseph M. Newcomer <newco...@xxxxxxxxxxxx> wrote:
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.xsth...@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: newco...@xxxxxxxxxxxx
Web:http://www.flounder.com
MVP Tips:http://www.flounder.com/mvp_tips.htm- Hide quoted text -

- Show quoted text -

Hi Joseph,

Too many things to check as per your thread. I checked everything. All
seems ok and I am using Cisco VPN to connect ot office network.
My code takes 5 mins from office and around 1 hr from off-office
connection using VPN. My connection speed is good 512Kbps.
I am using precompiled headers and the environment variables point to
the network shared drives and folders as:-

\\server1\\headerFolder1
\\server1\\headerFolder1\headerFolder2
\\server2\\headerFolder1
\\server2\\headerFolder1\headerFolder2

Unable to map network shared drives and folders when on Cisco VPN.

Any other clues or ideas ?

Thanks,
Abhishek
.



Relevant Pages

  • Re: vc++ mfc project build is extremely slow taking hours
    ... It could be that if all your CPP files are #including the same .h files, that loading those files over and over again (over the network) is what's causing a part of the slowdown. ... Things might speed up a bit (both over VPN and locally) if you switch to using precompiled headers and move all those common #includes into the precompiled header file. ... I do the same compilation from some other place than office, ...
    (microsoft.public.vc.mfc)
  • Re: vc++ mfc project build is extremely slow taking hours
    ... How sophisticated are the "third party" libraries. ... in slower compilation, but not an hour. ... Are you using precompiled headers? ...
    (microsoft.public.vc.mfc)
  • Re: vc++ mfc project build is extremely slow taking hours
    ... VPN can be miserably slow. ... 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: RDP Minimum config
    ... If you still want to reduce components from your original configuration, ... Common Control Libraries Version 5 ... Intel Protocol Network Address Translation ...
    (microsoft.public.windowsxp.embedded)
  • Re: security effects of adding wireless access
    ... Do not overestimate the issues of network security beyond ... >>that they install a wireless access point. ... >>I can't understand why so few libraries have not installed wireless ...
    (comp.security.firewalls)