nrwl / nx-console

Nx Console is the user interface for Nx & Lerna.
https://nx.dev
MIT License
1.31k stars 210 forks source link

VSCode extension is high on CPU usage #2202

Open FrikkieSnyman opened 2 months ago

FrikkieSnyman commented 2 months ago

Current Behavior

The VSCode extension for NX Console is utilising >100% CPU, constantly. When investigating what are behind these heavy pids, it is:

It also seems that these processes continue to run regardless of killing VSCode or disabling the NX extension.

As a result, this significantly drains battery life when using vsc with the NX console extension.

Expected Behavior

Less CPU usage.

Steps to Reproduce

Failure Logs / Images / Videos

CPU usage in Activity Monitor

Screenshot 2024-07-08 at 17 23 17

After killing those processes:

Screenshot 2024-07-09 at 09 04 59

Environment

MaxKless commented 2 months ago

Hello! Thanks for the report. Yes I've seen this too, I think it's an issue that pops up when the process is left running overnight and something happens... I haven't been able to track it down yet. I will work on a solution asap. Thanks for your patience.

jasonmacdonald commented 1 month ago

Just to add to this report, I'm also seeing the same issue when left open for a while.

I'm also having it crash the Typescript language server outright a lot. I had to disable the extension entirely.

MaxKless commented 1 month ago

could you add your nx report and some details about your workspace? size for example.

jasonmacdonald commented 1 month ago
 NX   Report complete - copy this into the issue template

Node   : 18.20.2
OS     : linux-arm64
yarn   : 1.22.19

nx                 : 19.2.1
@nx/js             : 19.2.1
@nx/jest           : 19.2.1
@nx/linter         : 19.2.1
@nx/eslint         : 19.2.1
@nx/workspace      : 19.2.1
@nx/devkit         : 19.2.1
@nx/eslint-plugin  : 19.2.1
@nx/nest           : 19.2.1
@nx/node           : 19.2.1
@nx/playwright     : 19.2.1
@nx/plugin         : 19.2.1
@nx/react          : 19.2.1
@nrwl/tao          : 19.2.1
@nx/web            : 19.2.1
@nx/webpack        : 19.2.1
nx-cloud           : 19.0.0
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
@nx/jest/plugin
---------------------------------------
Community plugins:
@nx-aws-plugin/nx-aws-cache : 3.2.0
nestjs-prisma               : 0.23.0
---------------------------------------
Local workspace plugins:
         @veeva/nx-plugin

Done in 5.33s.

This is a large repo of about 65 projects

jani-cs commented 1 month ago

I noticed the same issue as @jasonmacdonald explained on my side. If it helps here is my nx report:

   Node   : 18.19.1
   OS     : darwin-arm64
   npm    : 10.2.4

   nx (global)        : 19.4.2
   nx                 : 17.1.2
   @nx/js             : 17.1.2
   @nx/jest           : 17.1.2
   @nx/linter         : 17.1.2
   @nx/eslint         : 17.1.2
   @nx/workspace      : 17.1.2
   @nx/angular        : 17.1.2
   @nx/cypress        : 17.1.2
   @nx/devkit         : 17.2.0
   @nx/esbuild        : 17.1.2
   @nx/eslint-plugin  : 17.1.2
   @nx/node           : 17.1.2
   @nx/playwright     : 17.2.0
   @nx/plugin         : 17.1.2
   @nx/storybook      : 19.3.2
   @nrwl/tao          : 17.1.2
   @nx/web            : 17.1.2
   @nx/webpack        : 17.1.2
   typescript         : 5.2.2
   ---------------------------------------
   Community plugins:
   @ngrx/component          : 17.0.1
   @ngrx/component-store    : 17.0.1
   @ngrx/effects            : 17.0.1
   @ngrx/router-store       : 17.0.1
   @ngrx/schematics         : 17.0.1
   @ngrx/signals            : 17.0.1
   @ngrx/store              : 17.0.1
   @ngrx/store-devtools     : 17.0.1
   @storybook/angular       : 8.2.2
   @testing-library/angular : 13.4.0
   ng-mocks                 : 14.11.0
   ngx-build-plus           : 17.0.0
   ---------------------------------------
irfanullahjan commented 3 days ago

I have the same issue. Macbook M1