Avoid blocking main thread when a folder is opened #198384
Labels
extension-host
Extension host issues
extensions
Issues concerning extensions
freeze-slow-crash-leak
VS Code crashing, performance, freeze and memory leak issues
Does this issue occur when all extensions are disabled?: Yes
Version: 1.85.0-insider (user setup)
OS: Windows_NT x64 10.0.22518
These things block main thread significantly when starting up, following observations correspond to this CPU profile, but can be reproduced almost consistently:
spawn
to "get the repository root" which can block over 3 seconds:Note
spawn
in NodeJS is known to be synchronous and blocking: microsoft/vscode-python#22146 (comment). We can use worker threads here to spawn in a different thread, we've been doing the same in Python extension when spawning other binaries: microsoft/vscode-python#22146readFileSync
which blocks some time:The text was updated successfully, but these errors were encountered: