Author Topic: Code::Blocks Slow Compiling  (Read 4761 times)

Offline krugman25

  • Single posting newcomer
  • *
  • Posts: 2
Code::Blocks Slow Compiling
« on: June 21, 2015, 02:35:01 am »
I am running Ubuntu 14.04 and CB 13.12. I have compiled a project using Make, CB and KDevelop4. When I compile it using Make and KDevelop they both take around 10 minutes. When I compile using CB it takes 30 minutes. CB is definitely my IDE of choice but the 3x slower compiling is kind of painful. My only guess is the 2 are utilizing all cores and CB is only using a single core. The machine is a Mac Mini dual core I5. I did go into the compiler options and set the # of parallel builds to 4 (4 logical cores), but that didn't affect anything. Any thoughts on this?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Code::Blocks Slow Compiling
« Reply #1 on: June 21, 2015, 04:44:47 am »
Turn off all the CB plugins except for the Compiler Plugin.
If the problem goes away it is in one of the turn off plugins.

I would guess the Code::Completion (CC) plugin as the most likely cause.

It has been changed a lot since the last release; but, since I do NOT use it myself I have no idea if the slow down issue was fixed or not.
I do NOT recall building times being caused by the  CC plugin; but, I do remember many complaints about project slow to open caused by the CC plugin.

Tim S.
 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline krugman25

  • Single posting newcomer
  • *
  • Posts: 2
Re: Code::Blocks Slow Compiling
« Reply #2 on: June 21, 2015, 06:16:00 am »
I did as you mentioned and turned off all of the plugins except for compiler.  My new build time was 24 minutes, so it did seem to shave off 6 minutes.  It still is noticeably longer than the make and kdev.  I find it strange that if I put 1 parallel processes or 3 parallel processes, it doesn't speed up the compile time.  It makes me think that it's not working.  It is currently using the GCC compiler, I changed it to Clang and am rerunning my test.  I will post results.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code::Blocks Slow Compiling
« Reply #3 on: June 21, 2015, 06:33:25 am »
Maybe, you have many warning message printed when building. I remember there are some fixes in C::B's compiler plugin to accelerate the building process. That's not in in 13.12 release. You can try a SVN head version of C::B. I'm not sure there is one nightly build release for MAC, maybe, you can build it yourself.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Code::Blocks Slow Compiling
« Reply #4 on: June 21, 2015, 07:19:26 am »
Maybe, you have many warning message printed when building. I remember there are some fixes in C::B's compiler plugin to accelerate the building process. That's not in in 13.12 release. You can try a SVN head version of C::B. I'm not sure there is one nightly build release for MAC, maybe, you can build it yourself.

You might try turning off full logging and see if that helps.
Link to directions on how to turn it on. it should get you to the location to turn it off.
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Code::Blocks Slow Compiling
« Reply #5 on: June 21, 2015, 10:07:28 am »
Are there no tools on Mac to see how many resources are used ?
You should see if C::B starts many parallel processes.
By the way: C::B only starts parallel processes inside one project/target, if you have a workspace with many small units to compile, the speed gain might be small.
And at least on linux (and as far as I remember on windows, too) the feature works fine.
Another option might be to use ccache for compiling (if availableon Mac).