Author Topic: Prioritising  (Read 6697 times)

Poobah

  • Guest
Prioritising
« on: March 04, 2007, 06:21:54 am »
On my single processor (Celeron) system, Code::Blocks uses about 25% CPU usage while compiling, leaving the rest to the compiler. This is annoying, because it gives me the impression that it could be compiling faster if Code::Blocks wasn't using the CPU so much. Another similar annoyance is that when I'm running a program just compiled with Code::Blocks, the same occurs; Code::Blocks still uses about 25% CPU, so the program runs slower than it would normally.

Could one of the developers add a feature that allows users to choose the priorities of the child compiling processes and the compiled program? It would also be helpful to be able to have an option to change Code::Blocks' priority without its child processes inheriting this priority so that, for example, Code::Blocks could be low priority while the child processes could still be normal.
« Last Edit: April 18, 2007, 09:10:46 am by Poobah »

Poobah

  • Guest
Re: Prioritising
« Reply #1 on: April 02, 2007, 08:52:36 am »
(Bump)

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Prioritising
« Reply #2 on: April 04, 2007, 12:05:53 am »
Well it shouldn't be using all the CPU power at all.  Are you using a recent nightly?  There was recently a fixe with idle/update UI events that reduced CPU usage.
« Last Edit: April 07, 2007, 03:54:58 am by Game_Ender »

Poobah

  • Guest
Re: Prioritising
« Reply #3 on: April 05, 2007, 09:50:45 am »
I'm using the most recent one at the moment (April 4).

The problem only occurs when there's a source file open. If I close them all, it uses 0-1% CPU. I think some of the plug-ins may be causing the trouble.

Disabling individual plug-ins makes negligible difference, but disabling all of them results in an 8-10% CPU usage decrease, leaving the usage at about 5-8%, which is still too much. (I am using what I would consider a minimal set of plug-ins, by the way:

Autosave
Code completion
Code profiler
Compiler
Debugger
Files extension handler
Scripted wizard
Windows XP Look'n'Feel)

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Prioritising
« Reply #4 on: April 07, 2007, 03:55:27 am »
What happens when you disable code completion?  It does have to parse the files every time you save them, so it might just still be working.

Poobah

  • Guest
Re: Prioritising
« Reply #5 on: April 07, 2007, 07:03:09 am »
Disabling it makes negligible difference.

Poobah

  • Guest
Re: Prioritising
« Reply #6 on: April 18, 2007, 09:07:07 am »
(Bump.)

Poobah

  • Guest
Re: Prioritising
« Reply #7 on: May 17, 2007, 04:29:17 pm »
(Bump.)

Poobah

  • Guest
Re: Prioritising
« Reply #8 on: June 11, 2007, 08:00:15 am »
(Bump.)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Prioritising
« Reply #9 on: June 11, 2007, 08:41:29 am »
The compilation processes are started by wxExecute command. AFAIK, priority can't be specified in wxExecute command. :)
Be a part of the solution, not a part of the problem.

Poobah

  • Guest
Re: Prioritising
« Reply #10 on: June 12, 2007, 02:26:07 am »
Is there any way to increase or decrease thread priorities with wxWidgets?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Prioritising
« Reply #11 on: June 12, 2007, 10:06:15 am »
There certainly is a way, but it would be an awkward solution, and it is conceptionally wrong, too. If the IDE's burns too many CPU cycles (not an apparent problem here, though), then the number of cycles spent must be reduced, not its priority adjusted.

Fiddling with priorities is generally not a good idea unless there is a good reason, as it hurts performance more often than it helps. The same is true for things like locking memory pages, purging free pages, and setting CPU affinity masks. In most cases, such "optimizations" make things worse, not better.
Nevertheless, a lot of people do it, and "memory optimizer" tools are still being sold for real money, which is beyond my comprehension...
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Poobah

  • Guest
Re: Prioritising
« Reply #12 on: June 13, 2007, 03:07:28 am »
Alright. Thanks for explaining the situation. :)

I'm using a 2.2GHz Intel Celeron, so I guess that's why the problem is apparent on my computer.