You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AFAICS there is actually a lot of issues related to this.
Code
There is not really any code to show.
We do have a mono-repo, that for some issues with one of our dependencies creates manual symlinks between out packages.
Expected behavior:
Things should work
Actual behavior:
When I do a tsc --watch, it takes roughly ~30s to watch all the files, because it actually follows the symlinks.
When running tsserver, either via code or typescript-language-server, the process hangs for >60s with 100% cpu usage. I have attached a debugger and found out that all the time is spent following symlinks and watching those files.
Here is a screenshot of a short profile I have done:
(The profile only shows ~18s worth of directory walking, but in reality its way more.
Also, the tsserver process uses in excess of ~1400M of RAM, so it may also explain some of the OOM bugs that I have found with the search.
Playground Link:
Related Issues:
I think #10873 would be an extreme example of this
Otherwise there is a lot of issues mentioning watch mode and extremely slow performance, some of those mention mono-repos, so I guess a lot of this is related.
The text was updated successfully, but these errors were encountered:
That single line change basically fixed the hangs for me.
Of course if you want to properly fix this, you would have to maintain a Map of already walked directories and perform a lookup there if you encounter a symlink.
Maybe I will work on a patch tomorrow. Is there anything specific I need to keep in mind when doing that?
Hm, so apparently this was already fixed in #22976 / #22986, but it is not yet included in a stable release, although 2.8.2 was tagged, it is not yet on npm -_-
TypeScript Version: 2.8.1
Search Terms:
AFAICS there is actually a lot of issues related to this.
Code
There is not really any code to show.
We do have a mono-repo, that for some issues with one of our dependencies creates manual symlinks between out packages.
Expected behavior:
Things should work
Actual behavior:
When I do a
tsc --watch
, it takes roughly ~30s to watch all the files, because it actually follows the symlinks.When running
tsserver
, either viacode
ortypescript-language-server
, the process hangs for >60s with 100% cpu usage. I have attached a debugger and found out that all the time is spent following symlinks and watching those files.Here is a screenshot of a short profile I have done:
(The profile only shows ~18s worth of directory walking, but in reality its way more.
Also, the
tsserver
process uses in excess of ~1400M of RAM, so it may also explain some of the OOM bugs that I have found with the search.Playground Link:
Related Issues:
I think #10873 would be an extreme example of this
Otherwise there is a lot of issues mentioning watch mode and extremely slow performance, some of those mention mono-repos, so I guess a lot of this is related.
The text was updated successfully, but these errors were encountered: