File watching creates hundreds of recursive watchers in mono-repo when opening loose file #59985
Labels
Needs Investigation
This issue needs a team member to investigate its status.
Milestone
🔎 Search Terms
file watcher performance efficiency events
🕗 Version & Regression Information
I am not sure when this changed, but ever since
typescript.tsserver.experimental.useVsCodeWatcher
was added it becomes more visible now, at least to me as owner of the file watcher component in VS Code.⏯ Playground Link
No response
💻 Code
🙁 Actual behavior
When VS Code is not having any workspace open and it is just used for loose files (aka "empty window"), open a TS file from a huge mono repo (outlook client for example, that consists of thousands of TS projects). Notice how hundreds of recursive file watchers are getting created for each and every TS project in that mono repo, even though I just opened a single loose file of that project.
🙂 Expected behavior
TS should only watch what it actually needs to watch. If I open a loose file of a project, do not recursively resolve every other TS project and install file watchers. Only do this up to the minimal extent needed.
Additional information about the issue
Here is how you can see the data:
vscode
and a TS file, select "Set Log Level" and pick "Trace" from the command picker//cc @sheetalkamat @DanielRosenwasser
The text was updated successfully, but these errors were encountered: