Skip to content

Comments

Do not watch parent folders recursively if not needed#24933

Merged
sheetalkamat merged 2 commits intomasterfrom
failedLookupWatchesWithClassicResolver
Jun 14, 2018
Merged

Do not watch parent folders recursively if not needed#24933
sheetalkamat merged 2 commits intomasterfrom
failedLookupWatchesWithClassicResolver

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
@sheetalkamat sheetalkamat merged commit 1cd604a into master Jun 14, 2018
@sheetalkamat sheetalkamat deleted the failedLookupWatchesWithClassicResolver branch June 14, 2018 20:09
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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