[fpc-pascal] How to find where my app consumes CPU?

Martin Wynne martin at 85a.uk
Wed May 19 20:46:43 CEST 2021


On 18/05/2021 20:59, Bo Berglund via fpc-pascal wrote:
> I have a pretty sizable console app written with Delphi 15 years ago but ported
> to Linux using FreePascal (3.2.0) with Lazarus (2.0.12) as IDE.

I have the same problem with high CPU usage for a 20-year-old Delphi App 
compiled in Lazarus(2.0)

When run in debug mode within the Lazarus IDE it runs fine.

When run stand-alone as a Windows exe the CPU usage shoots up to 30% and 
stays there.

I found that the problem is in the Lazarus Application.OnIdle event, 
which fails to honour the Done parameter and runs continuously:

 
http://docwiki.embarcadero.com/Libraries/Sydney/en/Vcl.Forms.TApplication.OnIdle

Martin.


More information about the fpc-pascal mailing list