microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.13k stars 28.52k forks source link

Code Helper (Plugin) is using 3GB of memory. #179348

Closed fanmingfei closed 1 year ago

fanmingfei commented 1 year ago

Type: Bug

It is very slow to use and cannot recognize JS/TS file types. I have tried deleting all related files and reinstalling the Arm64 version, but the issue persists.

image image

VS Code version: Code 1.77.1 (b7886d7461186a5eac768481578c1d7ca80e2d21, 2023-04-04T23:22:38.708Z) OS version: Darwin arm64 22.1.0 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Apple M1 (8 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
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|5, 3, 4| |Memory (System)|8.00GB (0.19GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
Extensions: none
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 nodejswelcome1cf:30587006 282f8724:30602487 pyind779:30671433 f6dab269:30613381 pythonsymbol12:30671437 2i9eh265:30646982 vsctsb:30705553 vscodeenable:30660116 defaultazurewalk:30687958 pythonms35:30701012 pythonclientmv:30705673 ```
mjbvz commented 1 year ago

Does this reproduce in the latest VS Code insiders build with all extensions disabled?

fanmingfei commented 1 year ago

Does this reproduce in the latest VS Code insiders build with all extensions disabled?

yes.

The following version does not have this issue.

Version: 1.75.1
Commit: 441438abd1ac652551dbe4d408dfcec8a499b8bf
Date: 2023-02-08T21:34:01.965Z (2 mos ago)
Electron: 19.1.9
Chromium: 102.0.5005.194
Node.js: 16.14.2
V8: 10.2.154.23-electron.0
OS: Darwin arm64 22.1.0
Sandboxed: No
mjbvz commented 1 year ago

Please follow these instructions to collect performance information. Share the output of code-insiders --status

fanmingfei commented 1 year ago
 /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code --status

Version:          Code 1.77.3 (704ed70d4fd1c6bd6342c436f1ede30d1cff4710, 2023-04-12T09:41:48.638Z)
OS Version:       Darwin arm64 22.4.0
CPUs:             Apple M1 (8 x 24)
Memory (System):  8.00GB (0.07GB free)
Load (avg):       5, 5, 5
VM:               0%
Screen Reader:    no
Process Argv:     --crash-reporter-id efd96132-3f3a-4464-9ce5-05b4a7c15928
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
                  opengl:                                 enabled_on
                  rasterization:                          enabled
                  raw_draw:                               disabled_off_ok
                  skia_renderer:                          enabled_on
                  video_decode:                           enabled
                  video_encode:                           enabled
                  vulkan:                                 disabled_off
                  webgl:                                  enabled
                  webgl2:                                 enabled
                  webgpu:                                 disabled_off

CPU %   Mem MB     PID  Process
    2       57   48322  code main
    0       16   48335     gpu-process
    0        8   48339     utility-network-service
    0       49   48340  window [1] (CreateForm.tsx — thesis)
    0       16   48393  shared-process
    0        8   48398       ptyHost
    0        0   48471         /bin/zsh -il
    0        0   48475         /bin/zsh -il
    0        0   48482         /bin/zsh -il
    0        0   48790           npm start
    0        0   48802             npm run dev
    0        8   48820               umi
    0        8   48823                 /usr/local/bin/node /Users/fanmingfei/thesis/thesis-assistant/node_modules/umi/bin/forkedDev.js dev
    0        0   48824                   /Users/fanmingfei/thesis/thesis-assistant/node_modules/@esbuild/darwin-arm64/bin/esbuild --service=0.16.17 --ping
    2        8   48828                   /Users/fanmingfei/thesis/thesis-assistant/node_modules/@esbuild/darwin-arm64/bin/esbuild --service=0.16.17 --ping
    0        0   48838                   /Users/fanmingfei/thesis/thesis-assistant/node_modules/@esbuild/darwin-arm64/bin/esbuild --service=0.16.17 --ping
    0        0   51887         /bin/zsh -il
    0        0   54181           npm start
    0        0   54193             node /usr/local/bin/nodemon index.js
    0        0   55752               /usr/local/bin/node index.js

Workspace Stats:
|  Window (CreateForm.tsx — thesis)
|    Folder (thesis): 304 files
|      File types: ts(76) js(57) tsx(52) json(10) less(8) DS_Store(7) png(6)
|                  md(5) css(4) txt(3)
|      Conf files: package.json(3) tsconfig.json(3)
Aburupa1389 commented 1 year ago

أرسل gasem alotef إليك رسالة إلكترونية في وضع الحفاظ على السرّية في Gmail:

[image: شعار Gmail]Re: [microsoft/vscode] Code Helper (Plugin) is using 3GB of memory. (Issue #179348) https://confidential-mail.google.com/msg/AA2T6PZdze_czNR4RrKNA2OlJ79jydwHeGbW3Mib49tCXiEQNa7-86eauVazMx2I3FOvezR5aK1skfOLSL0xSCNPmhYc_BK6fRwQ1RAFFLLkQXQ6hcQhG1-klUqu1wl3-MtJhKWPqFcYaPEM7mSlkpAyh4dPSqUpc9p-ru6M00ZwrFdIaZ8Cs8poOM2eB59XoJzDQiM2qN9q0iGDgO8_

تم إرسال هذه الرسالة يوم 15‏/04‏/2023 الساعة 8:51:34 م غرينتش-7 يمكنك فتحه بالنقر على الرابط أدناه. ولا يعمل هذا الرابط إلا مع @.***

عرض الرسالة الإلكترونية https://confidential-mail.google.com/msg/AA2T6PZdze_czNR4RrKNA2OlJ79jydwHeGbW3Mib49tCXiEQNa7-86eauVazMx2I3FOvezR5aK1skfOLSL0xSCNPmhYc_BK6fRwQ1RAFFLLkQXQ6hcQhG1-klUqu1wl3-MtJhKWPqFcYaPEM7mSlkpAyh4dPSqUpc9p-ru6M00ZwrFdIaZ8Cs8poOM2eB59XoJzDQiM2qN9q0iGDgO8_

يمنحك "الوضع السري في Gmail" مزيدًا من التحكُّم في الرسائل التي تُرسِلها. ربما اختار المُرسِل تحديد وقت انتهاء الصلاحية أو إيقاف الطباعة أو إعادة توجيه رسالة أو تتبّع الوصول إلى هذه الرسالة. مزيد من المعلومات https://support.google.com/mail/answer/7674059 Gmail: خدمة بريد إلكتروني مُقدَّمة من Google يخضع الاستخدام لـ سياسة خصوصية Google https://myaccount.google.com/privacypolicy?hl=ar Google LLC, 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA لقد استلمت هذه الرسالة لأن أحدهم أرسل إليك رسالة إلكترونية في وضع الحفاظ على السرّية في Gmail. [image: شعار Google]

fanmingfei commented 1 year ago

VSC Insiders

/Applications/Visual\ Studio\ Code\ -\ Insiders.app/Contents/Resources/app/bin/code --status

Version:          Code - Insiders 1.78.0-insider (3ad5774eb8123d4224eb55629df9e5f82fe13b99, 2023-04-14T05:28:28.338Z)
OS Version:       Darwin arm64 22.4.0
CPUs:             Apple M1 (8 x 24)
Memory (System):  8.00GB (0.11GB free)
Load (avg):       4, 4, 4
VM:               0%
Screen Reader:    no
Process Argv:
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
                  opengl:                                 enabled_on
                  rasterization:                          enabled
                  raw_draw:                               disabled_off_ok
                  video_decode:                           enabled
                  video_encode:                           enabled
                  vulkan:                                 disabled_off
                  webgl:                                  enabled
                  webgl2:                                 enabled
                  webgpu:                                 enabled

CPU %   Mem MB     PID  Process
    0       41   11231  code-insiders main
    0       16   11236     gpu-process
    0        8   11238     utility-network-service
    0       33   11239  window [1] (VipTag.tsx — thesis)
    0       25   11281  shared-process
    0       16   11295       ptyHost
    0       16   11351  fileWatcher [1]
    0       25   11352  extensionHost [1]
    0       33   11631       electron-nodejs (/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Code - Insiders Helper (Plugin).app/Contents/MacOS/Code - Insiders Helper (Plugin) --ms-enable-electron-run-as-node --max-old-space-size=3072 /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js --serverMode partialSemantic --useInferredProjectPerProjectRoot --disableAutomaticTypingAcquisition --cancellationPipeName /var/folders/3j/6y2sv_5n49l6l88c1s_jfxv00000gn/T/vscode-typescript501/1444cc47f0ceb39bc6e9/tscancellation-8dca993215132ebe3a9d.tmp* --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc)
   69      860   11632       electron-nodejs (/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Code - Insiders Helper (Plugin).app/Contents/MacOS/Code - Insiders Helper (Plugin) --ms-enable-electron-run-as-node --max-old-space-size=3072 /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName /var/folders/3j/6y2sv_5n49l6l88c1s_jfxv00000gn/T/vscode-typescript501/1444cc47f0ceb39bc6e9/tscancellation-3e768fb56608d631ebe2.tmp* --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc)
    0       25   11633         electron-nodejs (/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Code - Insiders Helper (Plugin).app/Contents/MacOS/Code - Insiders Helper (Plugin) --ms-enable-electron-run-as-node /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typingsInstaller.js --globalTypingsCacheLocation /Users/fanmingfei/Library/Caches/typescript/5.0 --enableTelemetry --typesMapLocation /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typesMap.json --validateDefaultNpmLocation)

Workspace Stats:
|  Window (VipTag.tsx — thesis)
|    Folder (thesis): 304 files
|      File types: ts(76) js(57) tsx(52) json(10) less(8) DS_Store(7) png(6)
|                  md(5) css(4) txt(3)
|      Conf files: package.json(3) tsconfig.json(3)

(base) ➜  ~ /Applications/Visual\ Studio\ Code\ -\ Insiders.app/Contents/Resources/app/bin/code --status

Version:          Code - Insiders 1.78.0-insider (3ad5774eb8123d4224eb55629df9e5f82fe13b99, 2023-04-14T05:28:28.338Z)
OS Version:       Darwin arm64 22.4.0
CPUs:             Apple M1 (8 x 24)
Memory (System):  8.00GB (0.16GB free)
Load (avg):       5, 4, 4
VM:               0%
Screen Reader:    no
Process Argv:
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
                  opengl:                                 enabled_on
                  rasterization:                          enabled
                  raw_draw:                               disabled_off_ok
                  video_decode:                           enabled
                  video_encode:                           enabled
                  vulkan:                                 disabled_off
                  webgl:                                  enabled
                  webgl2:                                 enabled
                  webgpu:                                 enabled

CPU %   Mem MB     PID  Process
    0       41   11231  code-insiders main
    0       16   11236     gpu-process
    0        8   11238     utility-network-service
    0       33   11239  window [1] (VipTag.tsx — thesis)
    0       16   11281  shared-process
    0       16   11295       ptyHost
    0       16   11351  fileWatcher [1]
    0       16   11352  extensionHost [1]
    0       16   11689       electron-nodejs (/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Code - Insiders Helper (Plugin).app/Contents/MacOS/Code - Insiders Helper (Plugin) --ms-enable-electron-run-as-node --max-old-space-size=3072 /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js --serverMode partialSemantic --useInferredProjectPerProjectRoot --disableAutomaticTypingAcquisition --cancellationPipeName /var/folders/3j/6y2sv_5n49l6l88c1s_jfxv00000gn/T/vscode-typescript501/1444cc47f0ceb39bc6e9/tscancellation-f84a48ff0737dd4ae9c1.tmp* --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc)
   69      942   11690       electron-nodejs (/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Code - Insiders Helper (Plugin).app/Contents/MacOS/Code - Insiders Helper (Plugin) --ms-enable-electron-run-as-node --max-old-space-size=3072 /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName /var/folders/3j/6y2sv_5n49l6l88c1s_jfxv00000gn/T/vscode-typescript501/1444cc47f0ceb39bc6e9/tscancellation-5439a272896bea0ebe1f.tmp* --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc)
    0       16   11691         electron-nodejs (/Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Code - Insiders Helper (Plugin).app/Contents/MacOS/Code - Insiders Helper (Plugin) --ms-enable-electron-run-as-node /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typingsInstaller.js --globalTypingsCacheLocation /Users/fanmingfei/Library/Caches/typescript/5.0 --enableTelemetry --typesMapLocation /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typesMap.json --validateDefaultNpmLocation)

Workspace Stats:
|  Window (VipTag.tsx — thesis)
|    Folder (thesis): 304 files
|      File types: ts(76) js(57) tsx(52) json(10) less(8) DS_Store(7) png(6)
|                  md(5) css(4) txt(3)
|      Conf files: package.json(3) tsconfig.json(3)
fanmingfei commented 1 year ago
image

When I open my frontend project, the memory usage increases without installing any plugins.

mjbvz commented 1 year ago

Please share the full arguments of the process that has the high memory usage. Without the full arguments it's not clear what is causing this

rljohnsn commented 1 year ago

I just experienced Code Helper (Plugin) consuming 32GB of ram and causing my mac to restart. Posting what I believe are pertinent info but due let me know if there is better info to capture and how in case it happens again.

macOS Monterey
Version 12.6
MacBook Pro (16-inch, 2019)
Processor 2.3 GHz 8-Core Intel Core i9
Memory 32GB 2667 MHz DDR4
Graphics Intel UHD Graphics 630 1536 MB
Visual Studio Code
Version: 1.76.2
Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
Date: 2023-03-14T17:54:09.061Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Darwin x64 21.6.0
Sandboxed: No
❯ code --list-extensions --show-versions
4ops.terraform@0.2.5
batisteo.vscode-django@1.10.0
christian-kohler.npm-intellisense@1.4.4
DanielSanMedium.dscodegpt@2.1.5
donjayamanne.python-environment-manager@1.0.4
donjayamanne.python-extension-pack@1.7.0
eamodio.gitlens@13.5.0
EditorConfig.EditorConfig@0.16.4
eriklynd.json-tools@1.0.2
golang.go@0.38.0
jinliming2.vscode-go-template@0.2.1
KevinRose.vsc-python-indent@1.18.0
lextudio.restructuredtext@189.3.0
lunuan.kubernetes-templates@1.3.1
magicstack.MagicPython@1.1.0
ms-azuretools.vscode-docker@1.25.0
ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11
ms-python.isort@2022.8.0
ms-python.python@2023.4.1
ms-python.vscode-pylance@2023.5.10
ms-toolsai.jupyter@2023.2.1200692131
ms-toolsai.jupyter-keymap@1.1.0
ms-toolsai.jupyter-renderers@1.0.15
ms-toolsai.vscode-jupyter-cell-tags@0.1.8
ms-toolsai.vscode-jupyter-slideshow@0.1.5
ms-vscode-remote.remote-containers@0.292.0
ms-vscode-remote.remote-ssh@0.100.0
ms-vscode-remote.remote-ssh-edit@0.84.0
ms-vscode.powershell@2023.5.0
ms-vscode.remote-explorer@0.4.0
njpwerner.autodocstring@0.6.1
PKief.material-icon-theme@4.27.0
redhat.java@1.16.0
redhat.vscode-yaml@1.12.2
Shan.code-settings-sync@3.4.3
shd101wyy.markdown-preview-enhanced@0.6.8
streetsidesoftware.code-spell-checker@2.20.4
trond-snekvik.simple-rst@1.5.3
VisualStudioExptTeam.intellicode-api-usage-examples@0.2.7
VisualStudioExptTeam.vscodeintellicode@1.2.30
vscjava.vscode-java-debug@0.50.0
vscjava.vscode-java-dependency@0.21.2
vscjava.vscode-java-pack@0.25.11
vscjava.vscode-java-test@0.38.2
vscjava.vscode-maven@0.41.0
vscode-icons-team.vscode-icons@12.4.0
wholroyd.jinja@0.0.8
misaelabanto commented 1 year ago

I'm facing the same issue on a Macbook Air M1. This is happing since the last update of VS Code.

$ code -v

1.78.2
b3e4e68a0bc097f0ae7907b217c1119af9e03435
arm64
mjbvz commented 1 year ago

Closing as need information from the original poster to investigate