Author Topic: CPU usage when idle.  (Read 2761 times)

Offline orefa

  • Multiple posting newcomer
  • *
  • Posts: 102
CPU usage when idle.
« on: September 23, 2005, 11:37:33 pm »
Curious... I just noticed in Windows task manager that CB uses up a little bit of CPU time even when it's not in use. A workspace with two projects are open, but no compilation nor editing is happening, yet task manager shows fluctuating percentages of CPU time between 2% and 8% on my system. That's quite a bit for an unused application. A background thread must be active. What is it doing?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: CPU usage when idle.
« Reply #1 on: October 02, 2005, 01:37:27 pm »
OnIdle.
It is a known issue that has been adressed here: http://forums.codeblocks.org/index.php/topic,467.0.html
Moving the mouse takes even higher amounts of CPU, up to 30-40%. If you profile Code::Blocks, you see it spends almost all that time inside the message dispatcher and the idle message handler.

There's a patch to remove most of that idle processing. Haven't looked at CVS lately since I've been away for a week and half, but I think Yiannis has fixed it in CVS, too.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline orefa

  • Multiple posting newcomer
  • *
  • Posts: 102
Re: CPU usage when idle.
« Reply #2 on: October 03, 2005, 08:24:30 pm »
Ah. Thanks.