Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code took 10.7 GB RAM usage after using it for one hour

It happened today when I suddenly noticed processes started getting slow on the computer. So I checked Task Manager to see what causes it.

Enter image description here

I have waited a couple of minutes to see if it changes by keeping Visual Studio Code in idle state and then my computer dumps the memory in BSoD (blue screen of death).

After rebooting, I tried the same way to reproduce the state and within 20~30 minutes, it is up to 5 GB.

Enter image description here

0 909 4452 c:\Users\arbaz\.vscode\extensions\ms-python.python-2018.12.1\languageServer.0.1.72\Microsoft.Python.LanguageServer.exe

What are the possible reasons causing this and how do I fix it?

Latest version:

Version:   1.30.0 (system setup)
Commit:    c6e592b2b5770e40a98cb9c2715a8ef89aec3d74
Date:      2018-12-11T22:29:11.253Z
Electron:  2.0.12
Chrome:    61.0.3163.100
Node.js:   8.9.3
V8:        6.1.534.41
OS:        Windows_NT x64 10.0.17134
Version:          Code 1.30.0 (c6e592b2b5770e40a98cb9c2715a8ef89aec3d74, 2018-12-11T22:29:11.253Z)
OS Version:       Windows_NT x64 10.0.17134
CPUs:             AMD Ryzen 7 1700 Eight-Core Processor   (16 x 3000)
Memory (System):  15.95 GB (3.87 GB free)
VM:               40%
Screen Reader:    no
Process Argv:     C:\Users\arbaz\AppData\Local\Temp\tasks.py
GPU Status:       2d_canvas:                    enabled
                  checker_imaging:              disabled_off
                  flash_3d:                     enabled
                  flash_stage3d:                enabled
                  flash_stage3d_baseline:       enabled
                  gpu_compositing:              enabled
                  multiple_raster_threads:      enabled_on
                  native_gpu_memory_buffers:    disabled_software
                  rasterization:                enabled
                  video_decode:                 enabled
                  video_encode:                 enabled
                  webgl:                        enabled
                  webgl2:                       enabled

CPU %   Mem MB     PID  Process
    0       66   14620  code main
    0       84    1092     gpu-process
    0       51    6332     shared-process
    0      199    8312     window (tasks.py - Visual Studio Code)
    0       85   11724       extensionHost
    0     2278    4452         c:\Users\arbaz\.vscode\extensions\ms-python.python-2018.12.1\languageServer.0.1.72\Microsoft.Python.LanguageServer.exe
    0        5   11296           console-window-host (Windows internal process)
    0      187   14320     window (Process Explorer)

Extensions:

Extension              Author       Version
                       (truncated)
-------------------------------------------------------
better-comments        aar          2.0.3
vscode-django          bat          0.17.0
unique-lines           bib          1.0.0
python-extension-pack  don          1.4.0
permute-lines          ear          0.0.10
MagicPython            mag          1.1.0
python                 ms-          2018.12.1
vscodeintellicode      Vis          1.1.2
like image 604
Arbazz Hussain Avatar asked Dec 17 '18 20:12

Arbazz Hussain


Video Answer


2 Answers

This issue is mostly caused by the extensions.

Try to monitor menu HelpOpen Process Explorer for a certain period to see which process name is taking large memory.

Try uninstalling all extensions and removing all their junk from %USERPROFILE%\.vscode\extensions for windows.

like image 146
Arbazz Hussain Avatar answered Oct 10 '22 06:10

Arbazz Hussain


This problem happened to me yesterday. I managed to fix the problem, but I am not sure if my solution applies to yours. I'm using Windows 10 and Visual Studio Code version 1.33.1.

The solution is to go to settings and enable jedi. The culprit that was consuming excessive RAM was Python language server. So, by enabling jedi, instead of using the Python language server for the intellisense function, jedi was used instead.

like image 43
guagay_wk Avatar answered Oct 10 '22 08:10

guagay_wk