Connecting Tech Pros Worldwide Help | Site Map

Abnormal C++ Compile Time - How to debug?

  #1  
Old January 25th, 2006, 08:15 PM
mieskola
Guest
 
Posts: n/a
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

  #2  
Old January 25th, 2006, 08:45 PM
Victor Bazarov
Guest
 
Posts: n/a

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
  #3  
Old January 25th, 2006, 08:45 PM
Ian Collins
Guest
 
Posts: n/a

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.
  #4  
Old January 25th, 2006, 09:05 PM
Ben Pope
Guest
 
Posts: n/a

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