-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
High CPU usage from node.mojom.NodeService #213136
Comments
Having similar issues |
Same here |
similar issues here on Mac /private/var/folders/rd/pts24m5j6x35m7ytf_q60yn80000gn/T/AppTranslocation/A5742310-7FCA-4A76-9CE4-CA349B49206B/d/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --type=utility --utility-sub-type=node.mojom.NodeService --lang=en-US --service-sandbox-type=none --dns-result-order=ipv4first --inspect-port=0 --user-data-dir=/Users/lss/Library/Application Support/Code --standard-schemes=vscode-webview,vscode-file --enable-sandbox --secure-schemes=vscode-webview,vscode-file --cors-schemes=vscode-webview,vscode-file --fetch-schemes=vscode-webview,vscode-file --service-worker-schemes=vscode-webview --code-cache-schemes=vscode-webview,vscode-file --shared-files --field-trial-handle=1718379636,r,11998688379030772291,12062321241314744751,262144 --enable-features=kWebSQLAccess --disable-features=CalculateNativeWinOcclusion,SpareRendererForSitePerProcess --variations-seed-version vs code version:
system info
|
That would be the extension host process, disable extensions will only have effect on installed extensions, builtin ones will be run and seems like an issue from one of them. Please use the following steps to capture a cpu profile of the process,
|
Bug also reproduced. It happens to me a the paste from clipboard action, sometimes. Version: 1.89.1 |
Same here. Version: 1.89.1 |
The issue stopped happening on my machine, at least for now, so I can't perform the extra profiling at the moment. |
Updating to 1.90.1 did not solve the issue. The moment I have a workspace open, the file watcher process continues to use 100% of one CPU core. |
have the same issue, did not see anything in vscode process explorer showing an extension that was using high cpu. it just said extension host was high
|
Please profile according to #213136 (comment) |
@petoknm there is no profiler, but there is a "performance" tab that i can record with. let me know if i did it right. i can try again 200%+ cpu usage @deepak1556 CPU-20240618T061059.cpuprofile another saw an extension be mentioned in that last one, so i uninstalled live share and live preview extensions |
Thank you @Geczy . I can confirm I am able to open the cpuprofile and see the recording. I see a lot of So to me it looks like VSCode is scanning (probably) the project files and therefore this issue could be caused by opening large projects? The project that was causing issues for was indeed quite large (multiple git submodules) |
looking at bottom-up i saw more referencing https://marketplace.visualstudio.com/items?itemName=kevinmcgowan.TypeScriptImport they even have a high cpu issue: and this extension hasn't been touched in 7 years i'm going to consider this solved for me ! thanks for the inspection help will come back if i notice usage is super high again |
Same story here, but different extension. vscode-gitblame is the culprit. There is a lot of calls to async_hooks that causes a lot of computation (with Here is the CPU profile for the curious : |
Same problem here since my last VSCode update to version 1.90.2. The culprit seems to be the dev-container extension for me. In addition to the CPU load, it also blocks a port that my application needs to function. |
This comment was marked as resolved.
This comment was marked as resolved.
I uninstall gitlens extension. I have long projects with a lot of git repositories inside. gitlens eatc my cpu and ram |
Edit: seems that in my case it was caused by Same issue with monorepo lerna project here. Seems that it's triggered by some monorepo + watcher process combination but definitely looks like a VSCode bug. I have to kill the offending process after running a command that includes file watching ( Version: 1.91.1 |
Ok, I was finally able to repro this issue again, and I captured the CPU profile: In my case, I see it being mostly idle, but possibly doing some async stuff, not sure... I see repeated calls to VS Code version: Code 1.92.0 (b1c0a14, 2024-07-31T23:26:45.634Z) |
@petoknm try disabling extension |
I also see a lot of git errors in the extension host output:
but it doesn't say what the error is, so I have no idea what is going on. |
Another profile with remote-containers disabled: Looks totally idle to me from the profile, but top is showing CPU at 100 for process:
and thats the mojom.NodeService thing when I look at the commandline of that process:
|
I found the same problem when an XCode build was much slower than usual on a new Macbook. There were 4-5 VSCode processes each consuming 100-150% CPU: Code Helper, Code Helper (Plugin) etc. Modern OSX seems to keep the UI more responsive when processes are hogging CPU, so I didn't notice until checking Activity Monitor. I followed the steps here, disabled many extensions, no change. I then quit VSCode and discovered that the processes did not die, so they were actually zombified. Force quit, restart Code and performance is back to normal. |
I am also experiencing unusually high CPU usage on MBP 2019 (with Intel chip) related to VSCode git extension. I didn't pick what errors were happening, but profiling showed that the git extension was calling something very often (almost every 20ms or so). Once I turned git extension off in VSCode settings, all the extra CPU usage went down. When I tried turning it back on, CPU usage went back up immediately. I also restarted system multiple times before and after finding out about the profiling results. I'm quite convinced that my issue is related to the git extension, but I don't know what could be the root cause. |
@deepak1556 let me know if you need any more information, otherwise I believe the label "info-needed" can be removed. |
Type: Performance Issue
This specific process always takes 100% CPU on machine:
I looked at the different ways to profile VSCode, but they didn't show this process, so it all looked normal. Even JS profiling doesn't capture this. This process still exists even if I run VSCode with disabled extensions and the process respawns after being killed.
VS Code version: Code 1.89.1 (dc96b83, 2024-05-07T05:16:23.416Z)
OS version: Linux x64 5.15.0-105-generic snap
Modes:
System Info
canvas_oop_rasterization: disabled_off
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: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Process Info
Workspace Info
A/B Experiments
The text was updated successfully, but these errors were encountered: