Connecting Tech Pros Worldwide Help | Site Map

Abnormal C++ Compile Time - How to debug?

mieskola
Guest
 
Posts: n/a
#1: Jan 25 '06
I have a project which contains numerous regular and test C++ files.
One test file in particular takes a ridiculously long time to compile
(about 3-5 minutes), whereas the rest of them take 3-4 seconds.

Is there a way to figure out what in this file is taking so long to
compile? Can I compile under gdb or dbx to find something?

Thanks!

AJ

Victor Bazarov
Guest
 
Posts: n/a
#2: Jan 25 '06

re: Abnormal C++ Compile Time - How to debug?


mieskola wrote:[color=blue]
> I have a project which contains numerous regular and test C++ files.
> One test file in particular takes a ridiculously long time to compile
> (about 3-5 minutes), whereas the rest of them take 3-4 seconds.
>
> Is there a way to figure out what in this file is taking so long to
> compile? Can I compile under gdb or dbx to find something?[/color]

Most likely that file has either abnormally large number of inclusions
or some of those included files are on a slow medium (like network).
Another possibility is that compiling that file takes long because there
are unusually many (compared to other files in your project) templates
generated... Hard to say. Try posting to the newsgroup that deals with
your compiler.

V
Ian Collins
Guest
 
Posts: n/a
#3: Jan 25 '06

re: Abnormal C++ Compile Time - How to debug?


mieskola wrote:[color=blue]
> I have a project which contains numerous regular and test C++ files.
> One test file in particular takes a ridiculously long time to compile
> (about 3-5 minutes), whereas the rest of them take 3-4 seconds.
>
> Is there a way to figure out what in this file is taking so long to
> compile? Can I compile under gdb or dbx to find something?
>[/color]
Break the file down and find which bit takes a long time.


--
Ian Collins.
Ben Pope
Guest
 
Posts: n/a
#4: Jan 25 '06

re: Abnormal C++ Compile Time - How to debug?


mieskola wrote:[color=blue]
> I have a project which contains numerous regular and test C++ files.
> One test file in particular takes a ridiculously long time to compile
> (about 3-5 minutes), whereas the rest of them take 3-4 seconds.
>
> Is there a way to figure out what in this file is taking so long to
> compile?[/color]

Inspection, usually.

Ben Pope
--
I'm not just a number. To many, I'm known as a string...
Closed Thread