4

I am using Delphi 7 but I have trialed the Delphi 2005 - 2010 versions.

In all these new versions my CPU utilization is 50% (one core is 100%, the other is "relaxed") when Delphi IDE is visible on screen. It doesn't happen when the IDE is minimized. My computer is overheating because of this.

Any hints why this happens? It looks like if I want to upgrade to Delphi 2010, I need to upgrade my cooling system first. And I am a bit lazy about it, especially that I want to discharge my computer and buy a new one (in the next 6 months) - probably I will have to buy a Win 7 license too.


Update
Delphi XE and XE7 is also plagued by this bug.


Solution below!

Gabriel
  • 20,797
  • 27
  • 159
  • 293
  • What type of CPU do you have? Maybe your computer just sucks. – samoz May 06 '10 at 15:40
  • 3
    Well I would like to warn you that your computer is not very reliable if it cannot support 100% load without overheating and yours is only at 50%! Common problems that cause this are bad, not enough or too much thermal paste and dust in your system. I recommend you try to use compressed air to remove dust and if its still too hot then change the thermal paste and I recommend OCZ Freeze. What temperature does it get too and what processor? – Jonathan Czitkovics May 06 '10 at 15:44
  • @Samoz it cant "suck" as you say. Its probably not well maintained. Or are you saying that its too slow? its atleast a Pentium 4 with HT or an atom with HT. If its a pentium 4 then its normal if it gets to 70-80 Celsius as idle is normally 55-65. – Jonathan Czitkovics May 06 '10 at 15:47
  • Does it make sense that the IDE is maxing out a thread when it's displayed on the screen? – erjiang May 06 '10 at 15:47
  • 4
    Regardless of whether "overheats" means smoke, fire, or "sounds like a jet taking off", the issue here isn't cooling, pet hair, etc.. The Delphi IDE should not use 100% CPU for extended periods of time. So let's help the guy figure out what's wrong. – Chris Thornton May 06 '10 at 15:51
  • 3
    @Altar: To find out your CPU model, press Win+Pause. – Andreas Rejbrand May 06 '10 at 15:56
  • @Chris Thornton I was just giving him advice so that his computer does not break on him. But if you think about it, if as I commented on your question he has a Pentium 4 1.4GHZ then that could explain why its taking so long for the CPU utilization to go back to idle. – Jonathan Czitkovics May 06 '10 at 15:56
  • @Chris Thornton also if a computer gets too hot it slows down. – Jonathan Czitkovics May 06 '10 at 16:05
  • @Altar I verified your processor and its definitely fast enough to use and IDE like Delphi. – Jonathan Czitkovics May 06 '10 at 16:11
  • @Altar For your overheating issue for the future. Your HDDs are probably getting too hot due to dust or your system is not venting out the heat fast enough. – Jonathan Czitkovics May 06 '10 at 16:13
  • IDEs run in usermode, they aren't _allowed_ to overheat the CPU because the kernel wont let them. Computer must be configured badly somehow. – L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳ May 07 '10 at 16:19
  • 1
    The OP's conclusion is scary on so many levels... – Blindy Aug 19 '10 at 20:21

4 Answers4

10

SOLUTION

The 100% CPU utilization problem is caused by a Delphi button (in Delphi's toolbar)!
I like to switch between the new full screen and old Delphi-7-like IDE. There is a button called "dock edit window" that does this. Every time I installed a new version of Delphi, I configured the look of the IDE and put that button handy in the toolbar. After I remove the button, everything works fine.

Conclusion, don't drop this button on your IDE toolbar.


Update 2010
I discovered a similar issue when I open a DPR file in IDE. No solution for this, though.

Update 2011
Yet another similar Delphi bug (solution provided by @Warren P) Delphi XE takes one full core (100% CPU utilization)

Update 2015
I have found the button that was causing the above mentioned issue (100% CPU utilization while editing the DPR file) - It was the 'Use unit' button.

Community
  • 1
  • 1
Gabriel
  • 20,797
  • 27
  • 159
  • 293
  • 1
    I'd like to confirm that I, too, had this issue with Delphi 2007 and as soon as I removed the button from the toolbar the problem went away. – Jerry Gagnon Aug 14 '12 at 13:53
3

..it's the way Delphi Action works. Some "buttons" uses Action to monitor things, well if Action on Idle event performs some code this keeps happening taking CPU usage just like you have code performed in an infinite loop.. no much you can do except like you said, dont use that button.

hola
  • 71
  • 2
2

I guess first step would be to try to identify which part of delphi is taking 100%. Is it the main thread, or a secondary thread? If you manage to identify which thread is hogging all the CPU power, I guess you could debug the IDE (Attach to process from a 2nd instance of delphi, can be D7 so you won't have 2 apps flooding your CPU), and then step into the "offending" thread. With some luck, the code executing could have some debug information indicating what is being done.

If you have any 3rd party/Home components installed, try removing them.

Like already mentionned, try disabling code insight.

Try disabling any anti-virus running. (Maybe some kind of Live-lock)

That's all I can think of right now...

Ken Bourassa
  • 6,363
  • 1
  • 19
  • 28
1

It's the code insight or other IDE feature, compiling stuff in the background. It's pretty normal for D2005 to go into "zombie" mode for half a minute or so and swamp one of my cores. It seems to be much better in D2010 though. Try turning off the IDE gizmos (code completion, code parameters, tootip, error insight, etc..) and see if that calms things down. If it does, then turn them back on one at a time and see what you find.

Chris Thornton
  • 15,620
  • 5
  • 37
  • 62