Board index » cppbuilder » Follow-up to "Help! Pre-Compiled Header troubles"

Follow-up to "Help! Pre-Compiled Header troubles"


2004-11-06 08:49:34 AM
cppbuilder2
Hi all,
I finished adding the pre-compiled header to all of our cpp files and it has
helped. Now instead of compiling 200000 lines or so of code per unit it will
compile on average 500-2000 lines of code per unit. However there is still a
problem. For some reason there is a strange pause between the compiling of
one unit and the next. The time between the line count going from 0 to the
total number is only a second or two, but there than can be a 3-5 second
delay between that and starting on the next cpp unit.
In contrast, in one of our other projects (in this case a package of VCL
controls we use) there is no such delay. Even though we don't have
pre-compiled headers in that project, there is virtually no delay from the
time the last line of one unit is reached to the start of the next unit.
Any ideas on what could be causing this delay? It is a large project
(executable of about 30 MB when built, with a couple hundred cpp files), and
it has a lot of legacy code in it (including goto statements, yes goto's -
don't ask).
 
 

Re:Follow-up to "Help! Pre-Compiled Header troubles"

Check the paths for include files in the project. If
there is a network path that isn't present then it will
have to wait for a timeout. Make the first element in
the paths to be the most likely one.
. Ed
Quote
Isaac Church wrote:

I finished adding the pre-compiled header to
all of our cpp files and it has helped. Now
instead of compiling 200000 lines or so of code
per unit it will compile on average 500-2000
lines of code per unit. However there is still a
problem. For some reason there is a strange pause
between the compiling of one unit and the next.
The time between the line count going from 0 to
the total number is only a second or two, but
there than can be a 3-5 second delay between that
and starting on the next cpp unit.
...
 

Re:Follow-up to "Help! Pre-Compiled Header troubles"

"Isaac Church" wrote:
Quote
However there is still a
problem. For some reason there is a strange pause between the compiling of
one unit and the next. The time between the line count going from 0 to the
total number is only a second or two, but there than can be a 3-5 second
delay between that and starting on the next cpp unit.

It is a large project
(executable of about 30 MB when built, with a couple hundred cpp files),

The more *.obj files are put into single directory, the slower
compiler is (no idea why). Make sure every project uses its own
directory for intermediate output. Split project into pieces if possible.
You may also use RAM disk. It made wonders for me.
/Pavel
 

{smallsort}

Re:Follow-up to "Help! Pre-Compiled Header troubles"

How big is the generated CSM file?
H^2
 

Re:Follow-up to "Help! Pre-Compiled Header troubles"

It's about 15 MB. I'm using a machine with 512 MB of memory.
"Harold Howe [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
How big is the generated CSM file?

H^2
 

Re:Follow-up to "Help! Pre-Compiled Header troubles"

I shuffled the paths around, and checked for a network path (there weren't
any). Didn't help.
"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote

Check the paths for include files in the project. If
there is a network path that isn't present then it will
have to wait for a timeout. Make the first element in
the paths to be the most likely one.

. Ed

>Isaac Church wrote:
>
>I finished adding the pre-compiled header to
>all of our cpp files and it has helped. Now
>instead of compiling 200000 lines or so of code
>per unit it will compile on average 500-2000
>lines of code per unit. However there is still a
>problem. For some reason there is a strange pause
>between the compiling of one unit and the next.
>The time between the line count going from 0 to
>the total number is only a second or two, but
>there than can be a 3-5 second delay between that
>and starting on the next cpp unit.
>...

 

Re:Follow-up to "Help! Pre-Compiled Header troubles"

I can't split the project up at this time, but I did set up a seperate
directory for the obj files. Didn't help.
"Pavel Vozenilek" < XXXX@XXXXX.COM >wrote in message
Quote

"Isaac Church" wrote:

>However there is still a
>problem. For some reason there is a strange pause between the compiling
>of
>one unit and the next. The time between the line count going from 0 to
>the
>total number is only a second or two, but there than can be a 3-5 second
>delay between that and starting on the next cpp unit.
>
>It is a large project
>(executable of about 30 MB when built, with a couple hundred cpp files),
>
The more *.obj files are put into single directory, the slower
compiler is (no idea why). Make sure every project uses its own
directory for intermediate output. Split project into pieces if possible.

You may also use RAM disk. It made wonders for me.

/Pavel