live-share icon indicating copy to clipboard operation
live-share copied to clipboard

High CPU load from "Electron" process when in Live Share session, macos arm64

Open ehamwey opened this issue 3 years ago • 23 comments

Describe what happened: Getting abnormally high CPU load from a ghost "Electron" process which has parent process Electron, which itself has parent VS Code. MacOS Big Sur on M1 CPU (arm64) on latest vs code insider build (1.64.0), and latest Live Share version. This only appears when in a Live Share session as a guest, I haven't tested whether it happens if you're the host.

What was your system configuration? Product and Version [VS/VSCode]: VSCode Insiders 1.64.0-insider OS Version[macOS/Windows]: macOS Big Sur 11.2.3 arm64 Live Share Extension Version: v1.0.5196 Target Platform or Language [e.g. Node.js]: Node

Steps to Reproduce / Scenario:

  1. Join Live Share session on above system
  2. Open Activity Monitor
  3. Sort CPU processes by % CPU header
  4. See high CPU usage, battery drain, etc.

Please attach logs to this issue: See attached 20211210_230542_Agent.log 20211210_230555_16391775556830_VSCode.log

Screenshots image

ehamwey avatar Dec 10 '21 23:12 ehamwey

+1 but on intel mac and just the normal VSCode

avasilic avatar Dec 27 '21 18:12 avasilic

Did you have the audio extension installed?

Davsterl avatar Jan 06 '22 17:01 Davsterl

@Davsterl Yes

avasilic avatar Jan 09 '22 22:01 avasilic

same issue on m1 air when using vscode electron hits 98% cpu usage

sidwebworks avatar Feb 20 '22 18:02 sidwebworks

same issue here. I have to quit vscode every once in a while

gilpark avatar Feb 22 '22 15:02 gilpark

Same here with:

  • macOS Monterey
  • Intel processor
  • Visual Studio Code 1.64.2
  • Live Share v1.0.5330

It got to the point where live share feature as a guest (but not as a host) is unusable.

dariacm avatar Feb 25 '22 11:02 dariacm

Are more of us just going to keep reporting it here or will someone from the live share team please decide to step in, take action and try to diagnose the issue further?

avasilic avatar Feb 25 '22 11:02 avasilic

Same here with:

  • macOS Monterey
  • Intel processor
  • Visual Studio Code 1.64.2
  • Live Share v1.0.5330

It got to the point where live share feature as a guest (but not as a host) is unusable.

Same issue here with the same specifications. Please solve this issue!

jessicazappa avatar Feb 25 '22 11:02 jessicazappa

okay guys i think I have an solution, if anyone of you guys is using typescript? then I did two things to fix my CPU issue,

  1. Switch to this extension https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-next
  2. Downgrade your typescript version inside projects to 4.4.4 apparently TSC was the culprit in my case, all of my builds started failing due to a bug in latest TS release and when I saw the same behavior on one of my vercel deployments then I got it.

sidwebworks avatar Feb 25 '22 17:02 sidwebworks

Are all of these occuring for you when the Live Share Audio extension is installed? We're trying to reproduce this behavior.

Davsterl avatar Feb 25 '22 19:02 Davsterl

For me yes, even after uninstalling the issue persists, like a curse

avasilic avatar Feb 25 '22 20:02 avasilic

For me as well, the CPU usage is really high after joining a live share session.

YingboMa avatar Feb 25 '22 20:02 YingboMa

@Davsterl - i dont have liveshare extension installed and still i am facing this problem.

balajiprabuk avatar Mar 03 '22 05:03 balajiprabuk

Same here with:

  • macOS Monterey
  • Intel processor
  • Visual Studio Code 1.64.2
  • Live Share v1.0.5330

It got to the point where live share feature as a guest (but not as a host) is unusable.

Same system, same version, same issue.

zaptrem avatar Mar 14 '22 01:03 zaptrem

Same for me except no Live Share connection:

  • macOS Catalina 10.15.7
  • GHz 6-Core Intel processor
  • 16 GB of RAM
  • VS Code 1.64.2

I opened Activity Monitor and quit electron task. Got a popup in VS Code that the Extension host terminated unexpectedly. Gave me a helpful popup to Restart Extension Host. Did so, and everything was snappy again. I was locally running a Go server (including MySQL database, ElasticSearch server and GCSFuse), a Typescript watch build command through NPM and a SASS watch terminal. All of these kept running no problem.

ayalda avatar Mar 18 '22 22:03 ayalda

Same is here with Intel Mac and VSCode.

Spirituss avatar Mar 24 '22 09:03 Spirituss

Same here:

  • VS Code 1.66.2 (Universal)

  • no Live Share

  • macOS Catalina 10.15.7

  • MacBook Pro (13 inch, 2017, two thunderbolt 3 ports)

  • 2.3 GHz Dual-Core Intel Core i5

  • 8 GB RAM

neither quitting VS Code nor killing the Electron process helps

mharmel avatar Apr 30 '22 07:04 mharmel

Same here:

with: Intel Mac (21.5-inch, 2017) 2,3 GHz Dual-Core Intel Core i5 32 GB 2133 MHz DDR4 Intel Iris Plus Graphics 640 1536 MB and VSCode.

For me it's happen while i am developing with nextjs (12.1.6) and VsCode version: 1.67.2. It's too slow (impossible to work), It's take 5s to change a tab.

cassioseffrin avatar Jun 06 '22 13:06 cassioseffrin

same in Mac Air Monterey M1.

VSCode: 1.67.2

joaoOanselmo avatar Jun 06 '22 19:06 joaoOanselmo

Version: 1.67.2 (Universal) Commit: c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5 Date: 2022-05-17T18:20:57.384Z (2 wks ago) Electron: 17.4.1 Chromium: 98.0.4758.141 Node.js: 16.13.0 V8: 9.8.177.13-electron.0 OS: Darwin x64 21.5.0

Same Macbook Pro Intel, OSX Monterey

zen1001 avatar Jun 07 '22 09:06 zen1001

After each text change in VSCode it begins to eat 100% CPU for some minutes starting to check it via extentions.

Spirituss avatar Jun 09 '22 12:06 Spirituss

Monterrey 12.3.1 M1 Pro

VSCode Version: 1.67.2 (Universal) Commit: c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5 Date: 2022-05-17T18:20:57.384Z Electron: 17.4.1 Chromium: 98.0.4758.141 Node.js: 16.13.0 V8: 9.8.177.13-electron.0 OS: Darwin arm64 21.4.0

dreamyguy avatar Jun 10 '22 10:06 dreamyguy

I found that if I force kill the process "Electron", the VSCode continues to work well but it stops eating the CPU.

Spirituss avatar Jun 11 '22 21:06 Spirituss

Apologies for the delay here.

From the thread, I see first off that this is occurring while having had the Live Share Audio extension installed. If so, we will soon be sunsetting this feature (Live Share Audio) and will work towards a better use experience for communication needs for Live Share users from the editor.

If you didn't have the Live Share Audio extension installed, are you still able to reproduce the issue? In the last few weeks, we released a change that removed a separate process we used to have named vsls-agent that could have been contributing to this behavior.

I will keep this issue open and add a "needs-more-info" label. Thank you.

derekbekoe avatar Nov 13 '22 00:11 derekbekoe

Closing this based on my above post. This should be resolved.

derekbekoe avatar Nov 30 '22 01:11 derekbekoe