User forums > Using Code::Blocks
C::B : a CPU consumer ?
Rockeye:
--- Quote from: tiwag on October 27, 2006, 10:01:23 am ---please try disabling plugins and do measures again,
i've enabled almost all plugins but wxSmith
--- End quote ---
It is exactly the same results : CB uses 10% of cpu...
--- Quote from: Pecan on October 27, 2006, 03:03:57 pm ---I'm not ready to put all the blame on CB.
--- End quote ---
Actually, I can't put the blame on CB because it appears that i am the only one with this problem... But it could be an incompatibilty between CB and some kind of processors (in my case AMD AthlonXP Mobile ) ???
Does anybody have an AMD laptop in here ?
As I said before, I pay a great attention to the cpu consomption because of my laptop batterie life, so I often check the processes' cpu usage, and CB is the only one who do that... I can suppose there is a set of instruction that are not (or badly) managed by my processor (or perhaps motherboard, i dont know).
thomas:
--- Quote from: Pecan on October 27, 2006, 03:23:31 pm ---Oh Well; I guess docs versus real world strike again. I chose wxIdleEvent only because I thought (from the docs) that it was going to be the most efficient and enter the code less than a timer would.
--- End quote ---
Pecan, don't worry about it. As I said: I do not mean to disgrace Keybinder as such, the above was exemplary, some other plugins do similar stuff. It just so happens that I knew some were using OnIdle, and I did a global file search, and the first hit was KeyBinder ;)
One should think that OnIdle is really something that does not use up CPU, but that's not the case (at least not with any textedit or Scintilla controls open). Also, one should think that it doesn't matter whether you call a more or less expensive time function, since it's only called very rarely anyway. However, the amount of time OnIdle is called seems to be directly proportional to the number of editors (and caret blink frequency), which is kind of crazy in my opinion. That's not a problem of yours, though... it's wrong from the side of wxWidgets.
The thing is really that the documentation is often far from reality and many problems that show up in our code are really wxWidgets quirks (or bugs). You're fighting windmills if you try to address every problem. ;)
Alpha:
Something curious I noticed is that Code::Blocks' CPU usage drops to zero if you click on a menu (like File), and leave the mouse hovering there. Perhaps something in this can be exploited for optimization on older computers?
thomas:
--- Quote from: Alpha on January 14, 2012, 01:00:46 am ---Something curious I noticed is that Code::Blocks' CPU usage drops to zero if you click on a menu (like File), and leave the mouse hovering there. Perhaps something in this can be exploited for optimization on older computers?
--- End quote ---
That's not something special, it is what happens in most message-driven GUI environments.
While CPU usage is zero, it also means you can do zero useful things. The main thread is not pumping messages, and no application callbacks are called.
Alpha:
Yes, but if Code::Blocks can be (optionally) put into this state during compilation, it will result in 10-20% shorter compile times on older computers.
(I have tested by leaving the mouse inside a menu while building a project.)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version