Code-server: Use vscode-nsfw watcher

Created on 8 Mar 2019  路  10Comments  路  Source: cdr/code-server

I'm seeing very high CPU usage when running code-server on my Mac Pro (SSD disk). I run it in a project root that contains all my projects, which have lots of node_modules files etc. This high CPU usage continues even when not doing anything with code-server / VSCode for a long time.

Version

  • code-server version: 1.31.1-100
  • OS Version: darwin-x64 node-v8.9.3

Steps to Reproduce

  1. Run code-server on Mac in project root (lots of projects under it)
  2. Open code-server in two Chrome browser windows (on a Windows computer)
  3. Observe high continuous CPU usage

screenshot 2019-03-08 at 13 49 40

Most helpful comment

The subprocesses taking all the CPU seem to be the ones with these parameters:

13819 kennu code-server --bootstrap-fork vs/workbench/services/files/node/watcher/unix/watcherApp --args ["--type=watcherService"] --data-dir /Users/kennu/.code-server

14132 kennu code-server --bootstrap-fork vs/workbench/services/files/node/watcher/unix/watcherApp --args ["--type=watcherService"] --data-dir /Users/kennu/.code-server

(They also include a long --env parameter but I removed it from here.)

screenshot 2019-03-08 at 18 55 02

All 10 comments

I have some error in my vps, over ram. It's need an optimisation

Having the same issue here with high cpu but I'm mapping a newly created empty folder
Version: v1.31.1-100

We'll be fixing high mem and CPU usage.

This appears to be abnormally high. Does the CPU stay at this usage?

For me it stayed like that overnight, as I left everything open and idle. In the morning I upgraded, restarted everything, and it went back to similar CPU %.

it fluctuates a little but immediately goes back to high cpu usage. I've tried all 3 versions in the release tab and all exhibit the same behaviour.

OS: ubuntu 18.04

Interesting. How much memory do you have allocated for it?

In my case I just run it on plain Mojave on a computer with 32GB RAM.

Hrm. We'll investigate this. Can you see which sub-processes those are? (all sub-processes run with additional arguments)

The subprocesses taking all the CPU seem to be the ones with these parameters:

13819 kennu code-server --bootstrap-fork vs/workbench/services/files/node/watcher/unix/watcherApp --args ["--type=watcherService"] --data-dir /Users/kennu/.code-server

14132 kennu code-server --bootstrap-fork vs/workbench/services/files/node/watcher/unix/watcherApp --args ["--type=watcherService"] --data-dir /Users/kennu/.code-server

(They also include a long --env parameter but I removed it from here.)

screenshot 2019-03-08 at 18 55 02

Ah wonderful. We'll be able to fix this for sure!

There's an issue regarding this on vscode as well: https://github.com/Microsoft/vscode/issues/3998

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rcarmo picture rcarmo  路  3Comments

KSXGitHub picture KSXGitHub  路  3Comments

pchecinski picture pchecinski  路  3Comments

Arsaev picture Arsaev  路  3Comments

infogulch picture infogulch  路  3Comments