visual-studio-code - Visual Studio Code 使用一小时后占用了 10.7 GB RAM

标签 visual-studio-code

今天发生了这种情况,当时我突然注意到计算机上的进程开始变慢。所以我检查了Task Manager看看是什么原因造成的。

Enter image description here

我等待了几分钟,通过将 Visual Studio Code 保持在空闲状态来查看它是否会发生变化,然后我的计算机将内存转储到 BSoD (蓝屏死机)。

重启后,我尝试以同样的方式重现状态,20~30 分钟内,容量已达到 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

导致此问题的可能原因是什么以及如何解决?

最新版本:

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)

扩展:

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

最佳答案

此问题主要是由扩展引起的。

尝试监视菜单帮助打开进程资源管理器一段时间,看看哪个进程名称占用了大量内存。

尝试卸载所有扩展,并从 Windows%USERPROFILE%\.vscode\extensions 中删除所有垃圾。

关于visual-studio-code - Visual Studio Code 使用一小时后占用了 10.7 GB RAM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53822808/

相关文章:

javascript - 如何在 VS 代码中的 JavaScript 字符串中语法高亮 HTML?

regex - Visual Studio Code 任务正则表达式未捕获构建错误输出

python - 如果有多个可能的返回值,pyright 是否应该根据传递的参数自动推断出正确的值?

typescript - Visual Studio Code 从扩展安装扩展

visual-studio-code - 如何在 Visual Studio Code 中选择大括号内的文本?

visual-studio-code - 在 VS Code 中将格式制表符转换为空格

python - 看不到输出,只能在终端

powershell - 运行 PowerShell 时跳转到集成终端底部

node.js - VScode 中的 REST 客户端代理问题

visual-studio-code - 更改终端中的 VSCode 错误字体颜色