CPU overheating because of Delphi IDE

前端 未结 4 879
庸人自扰
庸人自扰 2021-02-06 16:54

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\")

相关标签:
4条回答
  • 2021-02-06 17:11

    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.

    0 讨论(0)
  • 2021-02-06 17:13

    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.

    0 讨论(0)
  • 2021-02-06 17:21

    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...

    0 讨论(0)
  • 2021-02-06 17:31

    ..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.

    0 讨论(0)
提交回复
热议问题