Hi Andy,
[color=blue]
> Well thats a shame, so not really any different to loading two versions of
> the ide with different projects and building in both then![/color]
No, it isn't since we do track dependencies between projects. For future
versions we will enable intra-process parallellism. We did work on
concurrent PDB access for this release and that was the biggest blocker.
However, the fastest way is going to stay using multiple proc support for
building individual projects. The concurrent access to teh PDB does incur
serialisation overhead that you otherwise avoid. This is the way we
structure all our builds at Microsoft.
For precompiled headers the few top level tips are. Do NOT use /YX, do use
/Yc/Yu. Do make sure you have as much as possible of shared dependencies in
a set of .pch files, do make sure you don't create one mongo .pch file idf
most of your .cpp files only depend on a small part of it.
Try compiling stable code into libraries and linking them in.
If you determine that there is an issue with dependency checking, we can
definitely track that down if you can provide a reasonable repro. If you
cannot, then you can call our product support services and work with them
(and get re-imbursed for the support incident if the cause is indeed a bug
in the product, if you don't already have free incidents from buying the
product or MSDN).
Ronald Laeremans
Visual C++ team
"Andy Capon" <Andy
Capon@discussions.microsoft.com> wrote in message
news:0B0A72D6-6969-4B1A-AA05-ABB27F979AE3@microsoft.com...[color=blue]
> Hi Carl,
>
> Thanks for your reply see remarks below:
>
> "Carl Daniel [VC++ MVP]" wrote:
>[color=green]
>> Andy Capon wrote:[color=darkred]
>> > 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?[/color]
>>
>> 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.
>>[/color]
>
> 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!
>
>[color=green]
>> 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.
>>[/color]
>
> 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!
>
>[color=green][color=darkred]
>> > We are useing 2003 but 2002 did it as well.[/color]
>>
>> 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.
>>[color=darkred]
>> > 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.[/color]
>>
>> 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.[/color]
>
> Well thats a shame, so not really any different to loading two versions of
> the ide with different projects and building in both then!
>
>[color=green]
>>
>> -cd
>>
>>
>>[/color][/color]