# High CPU-load when starting VSC

**URL:** <https://community.openhab.org/t/high-cpu-load-when-starting-vsc/133152>\
**Category:** VS Code\
**Created:** [February 10, 2022, 6:44pm UTC](https://community.openhab.org/t/high-cpu-load-when-starting-vsc/133152 "2022-02-10T18:44:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Windrad](https://community.openhab.org/letter_avatar_proxy/v4/letter/w/46a35a/32.png) [@Windrad](https://community.openhab.org/u/Windrad)\
**Post date:** [February 10, 2022, 6:44pm UTC](https://community.openhab.org/t/high-cpu-load-when-starting-vsc/133152/1 "2022-02-10T18:44:29Z")

</div>

Hi guys,

I have a strange behavior concerning CPU-Load when opening VS-Code with OpenHab-Extention.

Openhabian 3.1 Snapshot is running on Rpi4, 4GB. The average load of the RPi is about 4% (see screenshot).

 ![1_idle_CPU-load](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/f/d/fd19417ae89f6b8cd4b2d05208081e47ba171a52.jpeg)

As soon as I start VSC the load goes up to 30% and stays at over 10%. Sometimes it even stays at 25%. OH becomes very slow then, sometimes it’s not really working any more.

 ![2_VSC_started](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/c/3/c3bbebd5196e96aee96355702d1bda14dc2bb76f.png)  
 ![3_VSC_running](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/9/b/9b78ea251c43828a8c764947ceaacf37b0425d50.png)

This high CPU-load stays, even when I stop VSC.

 ![4_VSC_stoped](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/c/5/c50d83bb9d8bcc274fe8a9a71b928ae867ee5f9a.png)

I have to restart OH (not the whole RPi, openhab is enough) to get back to normal 4% load.

 ![5_OH_restarted](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/3/6/36cd1a39a14006b6cadd73609d2119306fddb68a.png)

Anybody who has seen this behavior?

---

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [February 10, 2022, 6:50pm UTC](https://community.openhab.org/t/high-cpu-load-when-starting-vsc/133152/2 "2022-02-10T18:50:20Z")

</div>

I think this is generally known. If performance is a big issue on a limited system, try disabling LSP server in openHAB, although of course you will lose syntax checking features at the VSCode end.

---

<div class="post-metadata">

**Author:** ![Windrad](https://community.openhab.org/letter_avatar_proxy/v4/letter/w/46a35a/32.png) [@Windrad](https://community.openhab.org/u/Windrad)\
**Post date:** [February 10, 2022, 7:00pm UTC](https://community.openhab.org/t/high-cpu-load-when-starting-vsc/133152/3 "2022-02-10T19:00:48Z")

</div>

But why does the CPU-load stays high even VSC is closed again?

---

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [February 10, 2022, 9:13pm UTC](https://community.openhab.org/t/high-cpu-load-when-starting-vsc/133152/4 "2022-02-10T21:13:32Z")

</div>

Dunno, fires up a service and doesn’t put it away afterwards I expect. LSP has been implicated as a hog. You’re very welcome to track it all down!

---

<div class="post-metadata">

**Author:** ![m4rk](https://community.openhab.org/user_avatar/community.openhab.org/m4rk/32/49247_2.png) [@m4rk](https://community.openhab.org/u/m4rk)\
**Post date:** [February 11, 2022, 7:01am UTC](https://community.openhab.org/t/high-cpu-load-when-starting-vsc/133152/5 "2022-02-11T07:01:41Z")

</div>

Vscode seemed to be the cause of “out of heap space” lockups and ctrl-c copy and paste OH log errors, crashes. Disabling the language server fixed both issues for me. RPi4b, OH3.2
