Vscode-live-server: Code Helper Overloads CPU

Created on 19 Sep 2017  ·  13Comments  ·  Source: ritwickdey/vscode-live-server

Hi! Your plugin causes cpu overload in this code https://github.com/user921/live-server-cpu-overload.

  • vscode 1.16.1 (1.16.1)
  • macOS Sierra 10.12.6

Process "Code Helper" begins to overload just right after I press "go live".
Looks like this is similar to https://github.com/Microsoft/vscode/issues/11096

closed enhancement need more info

Most helpful comment

Awesome , your right !

The folder node_modules lead to this problem

2017-10-05 3 08 06

2017-10-05 3 10 22

On MAC the node_modules folder is a normal folder , liverServer watching every file here , however there has tens of thousands of files (different project different size , but always huge numbers)

image

All 13 comments

I am using Windows10. I am not getting high CPU usage or CPU overload as you maintained here. (For

I need few info.

  1. Is the HTML page to big in size ?
  2. Can you send me screenshot ?
  3. What are other extensions installed on your system?
  4. Please set the "liveServer.settings.NoBrowser" : true. and now press to "Go Live". Are you still getting the CPU Overload?

Not open liveServer
2017-10-05 11 03 24

When open liveServer heavy cpu load

2017-10-05 11 02 26
2017-10-05 11 01 46
2017-10-05 10 59 23

For same info

  • VSCode Version: Code 1.16.1 (27492b6bf3acb0775d82d2f87b25a93490673c6d, 2017-09-14T16:24:39.530Z)
  • OS Version: Darwin x64 17.0.0
  • Extensions:

Extension|Author (truncated)|Version
---|---|---
bracket-pair-colorizer|Coe|0.10.9
vscode-markdownlint|Dav|0.10.1
Angular-BeastCode|Mik|5.0.1
vscode-javascript-snippet-pack|aka|0.1.5
auto-rename-tag|for|0.0.14
live-html-previewer|hdg|0.3.0
vscode-auto-open-markdown-preview|hnw|0.0.4
path-autocomplete|ion|1.6.1
vscode-JS-CSS-HTML-formatter|lon|0.2.3
HTMLHint|mka|0.4.0
live-sass|rit|0.5.1
LiveServer|rit|2.2.0
convert-markdown-to-html|sak|5.8.1

(1 theme extensions excluded)

I don't think this cause other extensions
The page which I used for test is very small

If you need more info you can tell me .

Okay! When the issue is started? I meant, on the extension load time? or after clicking to 'go live'?

If it is after clicking to 'go live',
Is the HTML is too big? , please set following setting and look the performance.

"liveServer.settings.NoBrowser" : true,
"liveServer.settings.ignoreFiles": [
          "*",
          "**"
 ] 

[actually i don't have any MAC, on Windows, I am not getting any Performance Issue (If work-space isn't containing large file (eg 100MB)) ]

Awesome , your right !

The folder node_modules lead to this problem

2017-10-05 3 08 06

2017-10-05 3 10 22

On MAC the node_modules folder is a normal folder , liverServer watching every file here , however there has tens of thousands of files (different project different size , but always huge numbers)

image

Okay, That's great, Thanks for the feedback. I'm going to add **/node_modules/** as default settings.

btw, before doing this, let me know, is it working? **/node_modules/** not /node_modules/** ?

In fact I don't know the different between **/node_modules/** not /node_modules/**

but both of them are ok to fix this problem

Using **/node_modules/** cpu usage is normal too .

image

Thanks again 😄 .

Actually,
node_modules/** means node_modules directory starting from root.

  • e.g. :
    if your work-space root is /usr/project/
    /usr/project/node_modules/files => passed.
    /usr/project/subfolder/node_modules/files => failed.

**/node_modules/** any directory named node_modules.

  • e.g. :
    if your work-space root is /usr/project/
    /usr/project/node_modules/files => passed.
    /usr/project/subfolder/node_modules/files => passed.

Got it ! Thanks

This issue is resolved in v2.2.1. Please update the extension. - AND no need to set explicit setting for **/node_modules/** for it.

I'm now closing this issue. Let me know if it's resolved for you or not. 😄

Latest version shows as 1.18 -> https://code.visualstudio.com/download

And I'm running latest (1.18.1)

Yet, my CPU is 134% ( thanks to CodeHelper ) and mac fan is always on now -- which is a new phenomenon.

What steps do I need to do to kill/by pass this CodeHelper?

my CPU usage is 100% whenever turn on live-server; !!!
Should be fixed ! I am using the lastest ver.


Can confirm this still appears to be an issue on 1.41.1. Closing VSCode does not end the task either for some odd reason, got to force quit.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Stonerea656 picture Stonerea656  ·  5Comments

Rakesh-webdeveloper picture Rakesh-webdeveloper  ·  4Comments

Er-rchydy picture Er-rchydy  ·  3Comments

GaoHengdong picture GaoHengdong  ·  4Comments

kmdrGroch picture kmdrGroch  ·  5Comments