vscode-home-assistant icon indicating copy to clipboard operation
vscode-home-assistant copied to clipboard

100% CPU usage and high memory usage

Open benblazak opened this issue 1 year ago • 5 comments

MacOS 13.3.1 on an M2 MacBook Air VSCode 1.78.0

I've been noticing slow MacOS UI response the last couple days, and it seems it was some Code Helper tasks related to this plugin, along with a kernel task doing I'm not sure what.

Uninstalled the plugin, as I don't need it right now (my Home Assistant instance is more or less set up).

No idea how to reproduce, feel free to close if it looks like it was specific to my system. Just wanted to note the issue.

Extension runs in:

  • [X] VS Code for Desktop
  • [ ] Hassio Add-on
  • [ ] Visual Studio Online
  • [ ] Other:

I'm running VS Code on:

  • [ ] Windows
  • [X] Mac
  • [ ] Linux

I'm accessing my files:

  • [ ] From local disk
  • [X] Via remote SSH
  • [ ] Smb
  • [ ] Other:

benblazak avatar May 12 '23 22:05 benblazak

I've also persistently struggled with this. Although my connection is typically;

  • SMB

piersdd avatar Jul 22 '23 22:07 piersdd

same here, happens sometimes to me too, find my vm in 100% proc / ram load, as soon as i kill vscode proc everything goes to normal

runing on a linux debian vm

hellcry37 avatar Jan 19 '24 12:01 hellcry37

I just stumbled upon this plugin causing my CPU and memory usage problems. First let me start off, I'm a Linux noob, I started maybe 6 months ago, so if I say something dumb, please bare with me lol,

What I found out by using the 'top' command was 'node' was using a lot of CPU. Also, if I would leave the VSC instance, and go back, it would add another 'node' process. I tested this 3 times to verify before I shutdown the addon to stop the heat up of my Pi.

VS Issue

I used 'ps -Flww -p' with the PID at the end and it would show me a folder path to the .js file. I'm guessing this is the file that is being ran with node. Part of the path had the authors name, which allowed me to look at all the plugins that were enabled.

VS Issue 2

Of course that was this plugin and once I disabled and restarted VSC in HA the issues when away. the CPU usage would go back to 0% for the Addon once I left the VSC screen. I reenabled this plugin again, restarted and problem started again. So, disabled and now it works without issue, except the color formatting is gone.

Again, I'm Linux dumb, so forgive me, but I'm guessing that means the Node command that is left running when you leave/disconnect from the VSC instance is not being shutdown and is running as a zombie. Hopefully there is a fix for this soon. I like VSC so much better than File Editor. I need all the help I can get with syntax errors.

Ftown14 avatar Feb 10 '24 17:02 Ftown14

I was having this issue as well on Ubuntu. One sometimes two child processes kept rabidly going from something like 500mb to 2-2.5gb and then resetting back down to 500mb over and over, while using a larger than normal amount of CPU. Enough to ramp up my fans constantly. I had to remove the addon, as it was doing it at all times no matter what type of project I had opened.

MostHated avatar Feb 12 '24 17:02 MostHated

A suspicion here: Is it possible that the HA extension uses the Dev Containers VSCode extension OR some users installed the entire Remote Development Extension pack in VSCode (which includes Dev Containers)?

Just curious weather this could be related to https://github.com/microsoft/vscode-remote-release/issues/9586

If someone can confirm that the issue is related, please also drop a comment on the VSCode issue.

spacerunner5 avatar Feb 28 '24 05:02 spacerunner5