-
Notifications
You must be signed in to change notification settings - Fork 12.8k
1.65.0 Consuming a lot of CPU...code navigation is slow #48517
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
Please follow these instructions to collect performance information. Share the output of |
Here is the output of code --status:
|
Unfortunately that doesn't show anything using a lot of cpu What language are you working in? Does this reproduce in the latest VS Code insiders build with all extensions disabled? |
I am using nodejs/express and no extension is enable except |
@mjbvz I will give that a try....I am working in Typescript. I do notice that it really seems to kick in as soon as I open up a TypeScript file in the editor. With my current version, I did disable all extensions, but the problem still persists. Here is another code --status capture...
Task manager shows a very large amount of memory usage....CPU usage fluctuates between ~15 to 25%.... In this state, using code navigation tools, intellisense, etc. are basically unusable. |
@mjbvz Sorry for flooding this thread....I just installed the insider version....no extensions. It behaves the same way. Version: 1.66.0-insider (user setup) After I open a TypeScript file, it starts consuming quite a lot CPU and memory...I tried doing
|
Just FYI....I downgraded back to the January version: Version: 1.64.2 (user setup) ...the problem goes away there. So it really seems like something introduced in 1.65. |
@skhilliard Can you share a project that causes this issue so we can investigate? |
@mjbvz I tried creating a small project to reproduce but didn't have any luck. This currently is happening with our project which is quite large...and for obvious reasons, I can't put our company's code base up here....what else can I provide to help you? |
Try putting together a minimal project that demonstrates the problem so we can investigate on our machines Alternatively, you can also try collecting the TypeScript server log. However this may include source code that you either need to scrub or share the log with us privately:
|
@mjbvz I will gather the Typescript server log for you.....how can I share this with you at Microsoft privately? Thanks, |
@mjbvz I have some logs ready for you if you can supply the means by which to get them to you. Thanks, |
Great! You can email the logs to matb AT microsoft . com |
Maybe related: microsoft/vscode#145309 |
@mjbvz Did you have a chance to review the Typescript logs I email to you? Thanks! |
@skhilliard Yes thanks, I've forward them along to the TS team as I didn't see anything that stood out to me. Hopefully they will identify what is going on |
Has there been any feedback from the TS team regarding this? |
@skhilliard sorry for the delay. From your log I can see you have a dependency (direct or indirect) on mongoose, which has gotten a lot of complaints about the performance of their typings:
The recent comments match the timing of when you noticed a slowdown:
You could follow the instructions on generating a performance trace and send us that if you’re interested, but I suspect it will show a lot of time being taken up on mongoose. I’m interested in seeing if the new variance annotations being introduced in TypeScript 4.7 would help mongoose typings—I’ll plan to investigate a bit during the next release. |
this could be related to incomplete tsconfig setup, or eslintrc. You need to add node_modules, and build artifacts into exclude sections of tsconfig, and eslintrc files. This way it will stop looking there, hence reduce the load on CPU. |
Thanks for the suggestion, but I don't think that is the case. Here are the contents of my tsconfi.json file:
|
@skhilliard the mongoose maintainers have said they believe the issue is fixed in mongoose v6. Are you able to try that? (I have no idea how difficult the upgrade is.) |
The mongoose maintainers have identified some recent regressions and have a proposed fix up; see Automattic/mongoose#12284. I don’t think there’s anything specific to do on our side so I’m going to go ahead and close this out. |
Issue Type: Bug
After updating to the latest release of VS Code (1.65.0), it has starting consuming a lot more CPU and memory....code navigation is unusable. Any insights as to why this is happening?
VS Code version: Code 1.65.0 (b5205cc8eb4fbaa726835538cd82372cc0222d43, 2022-03-02T11:12:08.962Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No
System Info
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Extensions (20)
A/B Experiments
The text was updated successfully, but these errors were encountered: