The DelphiLint client spawns the server process lazily, but the server communication thread is started on startup. At present, the thread spin-waits until the process is started, causing unnecessary CPU usage before an analysis is run for the first time (idle CPU usage up to 8-10% on my PC).
This PR modifies the thread logic to instead wait for a TEvent that is triggered when the server process is initialized. This fixes the issue (idle CPU usage back down to 0-0.5% on my PC).
The DelphiLint client spawns the server process lazily, but the server communication thread is started on startup. At present, the thread spin-waits until the process is started, causing unnecessary CPU usage before an analysis is run for the first time (idle CPU usage up to 8-10% on my PC).
This PR modifies the thread logic to instead wait for a
TEvent
that is triggered when the server process is initialized. This fixes the issue (idle CPU usage back down to 0-0.5% on my PC).Fixes #20.