Added another todo as now we are watching too many files
This commit is contained in:
parent
dcbd7b10f1
commit
62ef6b1cda
1 changed files with 7 additions and 0 deletions
|
@ -849,6 +849,13 @@ namespace ts.server {
|
|||
|
||||
private configFileExists(configFileName: NormalizedPath, info: ScriptInfo) {
|
||||
const canonicalConfigFilePath = normalizedPathToPath(configFileName, this.currentDirectory, this.toCanonicalFileName);
|
||||
// TODO: (sheetalkamat) Need to reduce the number of watches by not watching directories right here.
|
||||
// Theorotically current approach is correct but in practice there will be very few scenarios where
|
||||
// the config file gets added somewhere inside the another config file. And technically we could handle that case in configDirectory watcher in some cases
|
||||
// But given that its a rare scenario it seems like too much overhead.
|
||||
// So what we want to be watching is: configFile if the project is open
|
||||
// And the whole chain only for the inferred project roots
|
||||
// instead create the cache and send it across, and put watches only if info gets added to the inferred project root?
|
||||
return this.watchConfigFileForScriptInfo(configFileName, canonicalConfigFilePath, info).exists;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue