Re: Please Stop It Rebuilding Everything!

From: Andy Capon (Capon_at_discussions.microsoft.com)
Date: 09/23/04


Date: Thu, 23 Sep 2004 09:35:02 -0700

Hi Carl,

Thanks for your reply see remarks below:

"Carl Daniel [VC++ MVP]" wrote:

> Andy Capon wrote:
> > Hi There,
> >
> > We have a medium size project about 2000 source files and 700,000
> > lines of code, as you can imagine this takes some time to rebuild all.
> >
> > Now our problem is that we have a code generator we have developed
> > that updates some of our classes, as an example lets say I update 50
> > files. When we do a build the ide builds nearly all of the source
> > files while we swear and then twiddle our thumbs for a couple of
> > hours.
> >
> > Its almost as if it says "well alot of files have changed I will just
> > rebuild everything".
> >
> > Does anyone know why this happens?
>
> Have you analyzed the dependencies in your code to demonstrate that
> significantly fewer files should be compiled? When you update classes with
> the code generator, are unchanged files given a new timestamp? If so, that
> could be a huge source of unnecessary re-work by the compiler.
>

I am definate of the dependencies affected a smaller amount of files,
unchanged files remain totally unchanged by the code-gernerator and are
read-only as they are in sourcesafe!

> Are you making proper use of precompiled headers? I'd expect a 700,000 line
> program to build in 10 minutes tops, even on a single processor machine if
> precompiled headers are used properly and consistently.
>

We are useing precompiled headers but maybe not properly, could you direct
me to some info on how to use them properly! If we could get this to build in
10 minutes you would be a hero!

> > We are useing 2003 but 2002 did it as well.
>
> I know there have been reports of VS always rebuilding everything, but I
> don't know any of the details in those cases - hopefully someone else that
> does know will reply as well.
>
> > As a side point I have noticed that the upcomeing version can use
> > multiple processors to build, will this work within one project as
> > then we could at least halve the time.
>
> No, it won't help you. The MP support in Whidbey works at the project
> level, so if you have 2000 source files in one project, they'll all be built
> sequentially. If you can restructure your code into several projects
> (libraries, I'd assume), then you could get some parallel compilation
> benefit.

Well thats a shame, so not really any different to loading two versions of
the ide with different projects and building in both then!

>
> -cd
>
>
>



Relevant Pages

  • Re: Please Stop It Rebuilding Everything!
    ... as you can imagine this takes some time to rebuild all. ... could be a huge source of unnecessary re-work by the compiler. ... precompiled headers are used properly and consistently. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: How to cache output of the compiler aka ccache
    ... If for some reason I want to rebuild everything from scratch, ... the buggy make file problem does not happen with Ada. ... You never need to invoke the compiler directly -- just use the build ...
    (comp.lang.ada)
  • RE: Huge project - long build time
    ... We too are having terrible speed problems with VS.NET. ... Until the middle of last week, build times were reasonable and the compiler ... now takes 20 minutes to rebuild the system. ... > references with dll references. ...
    (microsoft.public.dotnet.general)
  • Re: "Faster, More Powerful . 64 Bits!"
    ... > It's true that the smaller files would waste at least 64k each because MMFs ... the compiler only opens one ... It does, it's when rebuilding from the IDE, and when rebuild ... there are DCUs for each and every unit that was involved. ...
    (borland.public.delphi.non-technical)