Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » "Invoking CDT Builder" takes long time
"Invoking CDT Builder" takes long time [message #526938] Tue, 13 April 2010 14:28 Go to next message
slajerek . is currently offline slajerek .Friend
Messages: 20
Registered: April 2010
Junior Member
I was looking in Google and Bugzilla pages but I wasn't able to find any information on this topic. So I have quite complicated project in C++ extended for long time, I updated settings and added many libraries to the g++ command line, also the makefile is run by "make -j 4". Anyway, it takes a very long time (more than 10 seconds) to start incremental build.
When I perform a very simple change in one file, then Build All, a message "Invoking CDT Builder" is shown, and nothing happens for long time. After that the make and compilation is done very fast. This is very annoying, actually I was thinking to change Eclipse to other workflow system, as this becomes not comfortable, just waiting 15 seconds for compilation after very simple change. Could it be that I have wrong settings somewhere? Why it takes 10 seconds or more for just simple task as running "make -j 4" in shell? If this is problem in Eclipse - what C++ (fast!!) editor you suggest for Linux (besides of classic emacs or vim of course)?

Edit: I realized that I have slightly older version of Eclipse. I'll download and test this behavior in newest release.

Edit2: newest version has the same behavior. It takes ~10 seconds to start incremental build with message "Invoking CDT Builder" (which later on takes <1 second). Would somebody be so kind and explain what exactly "Invoking" is doing for that long time on my 4-core 2.6GHz machine (very complicated computations I suppose), and how to avoid them...

[Updated on: Wed, 14 April 2010 10:15]

Report message to a moderator

Re: "Invoking CDT Builder" takes long time [message #528997 is a reply to message #526938] Thu, 22 April 2010 14:50 Go to previous messageGo to next message
slajerek . is currently offline slajerek .Friend
Messages: 20
Registered: April 2010
Junior Member
I have found somewhere in bugzilla that it is a known bug... and in principle "Invoking CDT Builder" does nothing (nop loop) for some sanity things. Anyone knows a walkaround for this problem, it's very annoying bug.

[Updated on: Thu, 22 April 2010 14:54]

Report message to a moderator

Re: "Invoking CDT Builder" takes long time [message #529043 is a reply to message #526938] Thu, 22 April 2010 17:07 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1415
Registered: July 2009
Senior Member
<slajerek@gmail.com> wrote in message news:hq1v33$d93$1@build.eclipse.org...
>I was looking in Google and Bugzilla pages but I wasn't able to find any
>information on this topic. So I have quite complicated project in C++
>extended for long time, I updated settings and added many libraries to the
>g++ commandline, also the makefile is run by "make -j 4". Anyway, it takes
>a very long time (around 10 seconds) during incremental build.
> When I perform a very simple change in one file, then Build All, a message
> "Invoking CDT Builder" is shown, and nothing happens for long time. After
> that the make and compilation is done very fast. This is very annoying,
> actually I was thinking to change Eclipse to other workflow systems, as
> this becomes not comfortable waiting 15 seconds for compilation after very
> simple change. Could it be that I have wrong settings somewhere? Why it
> takes 10 seconds or more for just simple task as running "make -j 4" in
> shell? If this is problem in Eclipse - what C++ (fast!!) editor you
> suggest for Linux (besides of classic emacs or vim of course)?

Running "make -j 4" isn't necessarily a simple task. For complex projects,
make may need to examine a large number of files to figure out what needs to
be built. It has to go through all the dependencies of the make file to see
what has changed and what targets the changes affect. If the project is
complicated as you say, it is not surprising that it takes several seconds
before you start to see output from the command.

How long does it take to start outputting anything if you run the make
command from outside Eclipse on the command line?

You can turn off "Build Automatically" from the Project menu. This will
prevent the build step from running at each file save. You can manually
invoke Project->Build when you need an actual build.
Re: "Invoking CDT Builder" takes long time [message #529823 is a reply to message #529043] Tue, 27 April 2010 11:31 Go to previous messageGo to next message
slajerek . is currently offline slajerek .Friend
Messages: 20
Registered: April 2010
Junior Member
Thanks for reply.
I have tested with one small change in one of source files. It took approx. 11-12 seconds to build project in Eclipse (around 10 waiting with message "Invoking CDT Builder"). When I compiled project manually running make -j 4 it took:

[mars@host]:~/workspace/proj/Debug> time make -j 4 proj
Building file: ../src/head/XXX.cpp
Invoking: GCC C++ Compiler

(......)

Finished building target: proj

real 0m2.898s
user 0m2.412s
sys 0m0.484s

So certainly, it's not the case of make.

In fact I found some bug report from ~2005 in Eclipse's bugzilla with almost the same problem as I have now, but unfortunately I lost the link - it was when I was browsing web not on my machine, and I couldn't find it again few days later.
Re: "Invoking CDT Builder" takes long time [message #1779892 is a reply to message #529823] Mon, 15 January 2018 12:47 Go to previous messageGo to next message
Keith Jones is currently offline Keith JonesFriend
Messages: 1
Registered: January 2018
Junior Member
I've had a problem similar to this. In the end it was down to Automatically generated makefiles in the C++ Build settings. I disabled that and the responsiveness was much improved.
Re: "Invoking CDT Builder" takes long time [message #1779905 is a reply to message #1779892] Mon, 15 January 2018 16:27 Go to previous message
David VavraFriend
Messages: 805
Registered: October 2012
Senior Member
To determine if it is make or Eclipse, change the build command to something like "pwd" and see how long it takes to produce output.
It's unlikely any make option (such as -j 4) will cause Eclipse to delay execution of make.
It's more likely it is make that is taking a long time.
You can test this by adding a target that does nothing but echo a message then make that target.

[Updated on: Mon, 15 January 2018 16:34]

Report message to a moderator

Previous Topic:Gcov doesn't work after update to Oxygen 2
Next Topic:Toggle Comment (Ctrl+/) hotkey problem in Oxygen.2
Goto Forum:
  


Current Time: Sat Nov 17 13:13:00 GMT 2018

Powered by FUDForum. Page generated in 0.02602 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top