-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nonresponsive editor with large project when typescript.tsserver.watchOptions: vscode
#237351
Comments
Is this project open source for us to reproduce? |
repro project: https://github.com/pelmers-db/lots-of-tsx-files-slow-vscode the steps to repro:
|
@pelmers-db thanks, this issue is spot on, not only because I can reproduce but also because you actually found the perf issue in code 👏 In #237459 I am changing to a After my fix, there is still a CPU spike but it settles rather quickly. Would be great if you could then confirm this fix in insiders when it lands tomorrow. |
In testing with many thousand individual files, this operation is very expensive. Refs: #237351
This bug has been fixed in the latest release of VS Code Insiders! @pelmers-db, you can help us out by commenting If things still don't seem right, please ensure you're on version 2569d71 of Insiders (today's or later - you can use Happy Coding! |
I even found more optimisations thanks to your workspace:
|
Does this issue occur when all extensions are disabled?: No
Steps to Reproduce:
Debugging notes:
[trace] <semantic> Event received: createFileWatcher (0). { "id": 364, "path": "/home/peter.elmers/fortesting/generated_tsx_project/src/Component10322.tsx" }
nonRecursiveWatcher
which is nodejs: https://github.com/microsoft/vscode/blob/292d0bd51af8d7e107fa34b00955aceb7d9c03d5/src/vs/platform/files/node/watcher/watcher.ts/#L16-L17The issue seems to be that every time watchers change then we send in all of the watchers, so the watch code needs to loop through the list many times and find which ones to remove and which ones to keep. But this is just a cursory look.
cc @bpasero
The text was updated successfully, but these errors were encountered: