-
Notifications
You must be signed in to change notification settings - Fork 12.8k
tsserver.js/typingsInstaller.js is watching ignored directories (causing CPU load) #36394
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
Comments
(Experimental duplicate detection) |
To the bot: I have read through many bugs about high CPU load for tsserver.js/typingsInstaller.js but none of them seemed relevant to my specific situation (ts server log detecting changes to files that are supposed to be ignored). Also... I apparently cannot upload logs.
I have the snap-based install, which maybe doesn't have that option? |
That TS server's file watcher is separate from Do you have a {
"compilerOptions": {
...
},
"exclude": [
"**/web-ui/tmp/**"
]
}
`` |
I failed to get exclude to work :( I tried various patterns in the "exclude" array to no avail ("/tmp/", "tmp"). Since it's possibly relevant, I open a folder with VSCode: ~/work/git.
I don't see anything about the exclude property in the tsserver.log, but it still hits files in tmp.
But while reading https://code.visualstudio.com/docs/languages/jsconfig I thought maybe include could work. I only have 4 folders with JS in them after all... My jsconfig now has this:
I still don't see this mentioned in the tsserver.log, but I also don't see the watcher firing on files in tmp! So I have a "solution" to my problem. |
Moving upstream for TypeScript team's awareness |
We don't have support to ignore watch directories yet, but #35615 enables us for that. we haven't gotten around to it yet. Note that typescript tries to optimize watches where in instead of watching all failed lookup locations we watch directory corresponding to it or something similar. Since your OS is ubuntu, we are creating recursive watches.. |
@sheetalkamat what's the follow-up recommendation for this now? |
For now if the folder for |
TS Template added by @mjbvz
TypeScript Version: 3.7.3
Search Terms
I have Visual Studio Code 1.41.1 on Ubuntu 18.04.
I have an Ember project, that builds into a tmp/ directory.
I have added this to the watch exclude list because it's large and changes regularly (eg. while running tests).
I turned on verbose logging for tsserver (after reading many bugs and trying to identify the source of my CPU load). The logs show that changes inside the tmp directory are triggering something, which is probably why the CPU load is so high. Also, once this starts it seems to just loop forever? (or maybe it's just queued up the notifications).
Here's a sample of the part of the log that repeats.
Is there something else I need to do to stop tsserver from watching this excluded directory?
I can upload the whole log if it helps.
The text was updated successfully, but these errors were encountered: