Skip to content

Do not watch parent folders recursively if not needed #24933

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

Merged
merged 2 commits into from
Jun 14, 2018

Conversation

sheetalkamat
Copy link
Member

Fixes microsoft/vscode#51139 further to avoid the unnecessary directory watch triggers

In case of AMD resolution, say we are trying to resolve module "fs" we would go looking for file fs.ts/fs.tsx/etc in each of the ancestor folder. At this point we use to create directory watch in the ancestor folder but to watch it recursively. This lead to the watch being triggered frequently. This fixes that issue since ancestor folders will be watched only for something directly in it. (eg. ancestor/fs.ts) In rest of the scenarios we will watch subdirectory of ancestor folder as shown in #24471

This avoids watching folders like parent folder of the project root just to watch files created in the folder
Fixes microsoft/vscode#51139
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TSServer consume constant CPU load (~10% or even more) also I am not typing or doing anything in VS Code
2 participants