Delphi XE occupies one full core (100% processor load)

My Delphi began to overheat the processor. As soon as I start working with Delphi, it will take the full core for you, and the coolers will start working very hard. Is there a trick to fixing this?

I know that some people here in Stack Overflow will start to produce hot steam if I use the words โ€œDelphiโ€ and โ€œbugโ€ together, but this is a very unpleasant mistake, because it will spend a lot of energy (especially when the battery) and will computer age is premature due to overheating.


Update:

The problem only occurs if the active tab is a project file (dproj). As soon as I switch to another file (pas), the CPU returns to 0% -1%. This happens with ANY dproj file, but it happens ONLY if the IDE is visible on the screen (not minimized to the taskbar). So this is clearly a rendering error.


Update:

It seems that Warren P has found a way to create a similar error. See His answer.


Update:

I saw that the problem also occurs with a VERY large PAS block, but the maximum CPU usage appears after I enable the Delphi IDE window in the background (not in use) for 3-5 minutes. I can solve this by minimizing the window on the taskbar or by switching to another IDE tab.

+2
source share
3 answers

I found a way to reproduce a problem very similar to your problem. Create a new delphi project and add in the .DPR (the main source of the project) an ifdef condition that contains some code like this that will not parse ...

program IdeTestProject1; {$ifdef FOO} bar {$endif} uses Forms, Unit1 in 'Unit1.pas' {Form1}, Unit2 in 'Unit2.pas' {Form2}, Unit3 in 'Unit3.pas' {Form3}, Unit4 in 'Unit4.pas' {Form4}, Unit5 in 'Unit5.pas' {Form5}, Unit6 in 'Unit6.pas' {Form6}; {$R *.res} begin Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TForm1, Form1); Application.CreateForm(TForm2, Form2); Application.CreateForm(TForm3, Form3); Application.CreateForm(TForm4, Form4); Application.CreateForm(TForm5, Form5); Application.CreateForm(TForm6, Form6); Application.Run; end. 

So my suggestion is that you find all the conditional compilation directives and other complex syntax, including any functions or code that are directly in DPR, and move it to another block. Any code completion, error understanding, or any other function of the tireless repair of this device, and this leads to a performance error.

+4
source

Try removing any plugins for the Delphi IDE that you may have added. Try to see if this happens only in specific projects or source files. Use the debugger to go into the Delphi process and see what the call stack is. So you can see which part of Delphi is spinning the processor.

+7
source

I have a "monitor monitor" utility and have verified the bds.exe operations. I found that more .dcu is being processed. (Open file, read file, close file). To fix, I deleted all .dcu

+1
source

Source: https://habr.com/ru/post/1309024/


All Articles