graphql / graphql/graphiql

High CPU usage with GraphQL.vscode-graphql extension

Open
#2,459 9 comments 5 reactions 0 assignees View on GitHub
bug lsp-server
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

Issue Type: Performance Issue

With this extension disabled and some TypeScript files open in my editor, I was seeing an issue with the "Electron" process consuming ~300% CPU on my Mac, similar to e.g. https://github.com/microsoft/vscode/issues/142828.

Extension version: 0.4.6
VS Code version: Code 1.67.2 (c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5, 2022-05-17T18:20:04.972Z)
OS version: Darwin arm64 21.5.0
Restricted Mode: No

System Info

|Item|Value|
|---|---|
|CPUs|Apple M1 Max (10 x 24)|
|GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled|
|Load (avg)|2, 3, 4|
|Memory (System)|32.00GB (4.53GB free)|
|Process Argv|--crash-reporter-id 62e8a5cc-5388-43c6-9d85-144bc05db333|
|Screen Reader|no|
|VM|0%|

Process Info

```
CPU % Mem MB PID Process
22 262 98686 code main
2 98 98689 gpu-process
0 33 98691 utility-network-service
4 623 98693 window ([sofa] packages/graphql/schema/auth/index.ts)
0 295 98884 shared-process
0 66 98892 ptyHost
0 0 99082 /opt/homebrew/bin/zsh -l
0 0 99105 /opt/homebrew/bin/zsh -l
```

Workspace Info

```
| Window ([sofa] packages/graphql/schema/auth/index.ts)
| Folder (sofa): 10157 files
| File types: zip(7457) tsx(560) ts(528) json(253) js(239) yml(147)
| pack(94) md(85) svg(32) attrs(20)
| Conf files: package.json(28) tsconfig.json(19) github-actions(5)
| dockerfile(3) launch.json(1) settings.json(1)
| tasks.json(1)
| Launch Configs: node;
```

A/B Experiments

```
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30492333
vscaat:30438848
vsclangdc:30486549

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.