-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
File watcher consumes lots of CPU in large TS projects #214567
Comments
Is this with a TypeScript workspace? Does it get better if you configure |
Yep, i have a ts project. That setting really helped, thanks) |
@kamax1 would I be able to reproduce this issue if you gave me instructions how to get to the same workspace? |
unfortunately, i'm not able to share my repo. But i've reproduced it on several large projects so i suppose that it should be reproducable on any large TS project (mine have ~40k files) |
@kamax1 it cannot be so obvious to reproduce though, VS Code is a fairly large TS project where I am not seeing it (also as far as I know, not anyone from our team). Is it possible there are any cyclic symbolic links in your workspace? |
+1 for this issue. I'm working on a huge TS project and Remote-SSH to it from MacOS laptop to Linux machine.
Speaking of my project - yes, it's highly possible. Yet, I cannot say for sure.
Solved the problem for me as well |
Can people that are impacted here do the following:
This will print information about how many requests for file watching were sent to the file watcher process. I would expect this to be in the number of thousands. |
In my case it only displays local file watchers/requests. Either because it does not trace remote-SSH processes at all or it cannot get info from VSCode server since that connection "hangs up". Any other ideas how I may trace this data from remote VSCode server? |
Oh yeah sorry, I forgot that it will only report local watchers... |
Yes, looks like so, with have a lot of symlinked packages and looks like some of them are cycled |
There was 1 performance related fix for file watching pushed yesterday that is included in our insiders build today. I would be curious if people could try it out and report back. You can give our preview releases a try from: https://code.visualstudio.com/insiders/ |
I've checked insiders build on my project. Unfortunately, the issue is still there :( |
@smishenk when you say its a huge project, does it have many TS projects inside? |
Well, it does have some TS subprojects, yet I don't think that it matters in any way, cause the main part (~85% of TS code) is single TS project and, as I see in VSCode footer, TS server initializes separately for each opened project, while I have issues right after initialization of main part. When I say it's a huge project, I say we have to raise memory consumption limit for TS server up to 6 Gb: |
@smishenk is that project open source for me to play with? Does the CPU eventually settle or stay high? |
You would have a link already, if it was ;)
I can't say anything about that for now, cause I have issues with remote SSH development. Local CPU does almost nothing and I cannot profile remote machine since SSH connection hangs up the moment VSCode loads it with its processes. |
@bpasero
I'm wondering if I could enable some tracing/logs of TS server on remote-SSH to get detailed info |
/duplicate #216825 |
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines. Happy Coding! |
Type: Performance Issue
Hello! After latest update vscode stared using 100% cpu for each window. I found that it caused by fileWatcher process. I have a very large project but it was fine before the update. Could you fix it pls. Thanks!
VS Code version: Code 1.90.0 (Universal) (89de5a8, 2024-06-04T19:34:44.157Z)
OS version: Darwin arm64 23.4.0
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
Process Info
Extensions (18)
The text was updated successfully, but these errors were encountered: