I looked for hours why vscode-sfdx-hardis was freezing for 30 seconds after its startup
Then after a CPU Profile analysis.... it is salesforcedx-vscode-apex that was doing that.
Please can you fix this bug ?
Thanks !
cc @mitchspano
The event-loop freeze is not vscode-sfdx-hardis
The 15-20 s (here ~27 s) of blocking is the Salesforce Apex extension (salesforcedx-vscode-apex). Its findAndCheckOrphanedProcesses routine
calls execSync at startup — a synchronous child-process spawn that pins the extension-host event loop for the entire duration of the child. On
Windows that child is a process-listing command (wmic/tasklist/PowerShell), which is notoriously slow, and it's run in a loop:
- findAndCheckOrphanedProcesses (execSync): 23,571 ms
- canRunCheck → findAndCheckOrphanedProcesses (execSync): 3,778 ms
- = ~27.3 s of synchronous blocking, 92 % of all spawn time and the single biggest non-idle cost in the whole 120 s window.
I looked for hours why vscode-sfdx-hardis was freezing for 30 seconds after its startup
Then after a CPU Profile analysis.... it is salesforcedx-vscode-apex that was doing that.
Please can you fix this bug ?
Thanks !
cc @mitchspano