microsoft / vscode

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

Integrated terminal poor performance and freezing #53782

Closed phil-harmoniq closed 6 years ago

phil-harmoniq commented 6 years ago
Version: 1.26.0-insider
Commit: bd953248ad6a8e2f8896bfb78b3ae40e0fd47426
Date: 2018-07-06T05:17:37.386Z
Electron: 1.7.12
Chrome: 58.0.3029.110
Node.js: 7.9.0
V8: 5.8.283.38
Architecture: x64

Steps to Reproduce:

  1. Open the integrated terminal
  2. Maximize the terminal
  3. Start trying to type commands

Does this issue occur when all extensions are disabled?: Yes

The integrated terminal is freezing constantly and sometimes causing VS Code to take over 8GB of RAM and causing my entire system to become sluggish. I've seen this issue reported and claiming that version 1.24 would fix this but it hasn't and now those threads have all been locked. #36913 #47196 #46954

On the insiders version it seems to at least only freeze the terminal window itself, but this has basically made the terminal unusable for me. 🙁

I'd also like to note that keeping the terminal small minimizes the performance impact but is still noticeably sluggish

vscodebot[bot] commented 6 years ago

(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

Tyriar commented 6 years ago

@phil-harmoniq when you're seeing these problems can you run code --status and paste in the output? I'm mainly interested in the process tree.

You can also try updating your graphics card drivers or adding this setting:

"terminal.integrated.rendererType": "dom"
phil-harmoniq commented 6 years ago

Here is the result of code --status of a session that ended up freezing VS Code and popping up the dialog to close or wait for the program.

Version:          Code 1.25.0 (0f080e5267e829de46638128001aeb7ca2d6d50e, 2018-07-05T13:11:58.697Z)
OS Version:       Windows_NT x64 10.0.17134
CPUs:             Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz (8 x 2660)
Memory (System):  8.99GB (1.64GB free)
VM:               0%
Screen Reader:    no
Process Argv:     C:\Program Files\Microsoft VS Code\Code.exe
GPU Status:       2d_canvas:                    enabled
                  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:                disabled_software
                  video_decode:                 enabled
                  video_encode:                 enabled
                  vpx_decode:                   enabled
                  webgl:                        enabled
                  webgl2:                       enabled
CPU %   Mem MB     PID  Process
    0       65   10752  code main
    0       54    7076     shared-process
   12     3878   10404     gpu-process
    1      208   11132     window (settings.json - CliAppBuilder - Visual Studio Code)
    0       80    1544       extensionHost
    0       27    3580         "C:\Program Files\dotnet\dotnet.EXE" c:\Users\ph-ha\.vscode\extensions\tintoy.msbuild-project-tools-0.2.39\out\language-server\MSBuildProjectTools.LanguageServer.Host.dll
    0        8   11060           console-window-host (Windows internal process)
    0        2    5780         cmd /s /c "C:\Users\ph-ha\.vscode\extensions\ms-vscode.csharp-1.15.2\.omnisharp\1.30.1\OmniSharp.exe -s c:\Users\ph-ha\git\CliAppBuilder\CliAppBuilder.sln --hostPID 1544 --stdio DotNet:enablePackageRestore=false --encoding utf-8 --loglevel information formattingOptions:useTabs=false formattingOptions:tabSize=4 formattingOptions:indentationSize=4"
    0        8    4684           console-window-host (Windows internal process)
    0      108   13456           C:\Users\ph-ha\.vscode\extensions\ms-vscode.csharp-1.15.2\.omnisharp\1.30.1\OmniSharp.exe  -s c:\Users\ph-ha\git\CliAppBuilder\CliAppBuilder.sln --hostPID 1544 --stdio DotNet:enablePackageRestore=false --encoding utf-8 --loglevel information formattingOptions:useTabs=false formattingOptions:tabSize=4 formattingOptions:indentationSize=4
    0       26    6468         C:\Users\ph-ha\.vscode\extensions\ms-vsliveshare.vsliveshare-0.3.379\dotnet_modules\vsls-agent.exe --autoexit --pipe 806ffb1980524708b703d83ed95f7b88 --service https://insiders.liveshare.vsengsaas.visualstudio.com/
    0        8    5492           console-window-host (Windows internal process)
    0       60    9400         electron_node jsonServerMain.js
    0       12    4956       watcherService
    0        8    4564         console-window-host (Windows internal process)
    0        8    5736       electron-crash-reporter
    0       28    7476       searchService
    0       26   14072       terminal
    0        5    4128         winpty-process
    0        4    4572           "C:\Program Files\Git\bin\bash.exe"
    0        8    2380             "C:\Program Files\Git\bin\..\usr\bin\bash.exe"
    0        8   10312           console-window-host (Windows internal process)
Workspace Stats:
|  Window (settings.json - CliAppBuilder - Visual Studio Code)
|    Folder (CliAppBuilder): 102 files
|      File types: cs(29) cache(15) json(14) dll(11) pdb(8) props(4) xml(4)
|                  csproj(3) txt(3) targets(3)
|      Conf files: csproj(3) sln(1) launch.json(1) settings.json(1)
|                  tasks.json(1)
|      Launch Configs: coreclr(2)

Here is the output of code-insiders --status attempting the same thing:

Version:          Code - Insiders 1.26.0-insider (bd953248ad6a8e2f8896bfb78b3ae40e0fd47426, 2018-07-06T05:17:37.386Z)
OS Version:       Windows_NT x64 10.0.17134
CPUs:             Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz (8 x 2660)
Memory (System):  8.99GB (4.22GB free)
VM:               0%
Screen Reader:    no
Process Argv:     C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe
GPU Status:       2d_canvas:                    enabled
                  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:                disabled_software
                  video_decode:                 enabled
                  video_encode:                 enabled
                  vpx_decode:                   enabled
                  webgl:                        enabled
                  webgl2:                       enabled
CPU %   Mem MB     PID  Process
    0       77    3652  code-insiders main
    0        0    3660
    6      159    5000     window (ActionBuilder.cs - CliAppBuilder - Visual Studio Code - Insiders)
    0       10    1292       watcherService
    0        9    1592         console-window-host (Windows internal process)
    0       11    9964       electron-crash-reporter
    0       98   10204       extensionHost
    0       31   11644       terminal
    0        6   13112         winpty-process
    0        5    3412           "C:\Program Files\Git\bin\bash.exe"
    0        9    7420             "C:\Program Files\Git\bin\..\usr\bin\bash.exe"
    0        9   13528           console-window-host (Windows internal process)
    0       47    6312     shared-process
    0        0    6424
    9      950   11140     gpu-process
Workspace Stats:
|  Window (ActionBuilder.cs - CliAppBuilder - Visual Studio Code - Insiders)
|    Folder (CliAppBuilder): 102 files
|      File types: cs(29) cache(15) json(14) dll(11) pdb(8) props(4) xml(4)
|                  csproj(3) targets(3) txt(3)
|      Conf files: csproj(3) sln(1) launch.json(1) settings.json(1)
|                  tasks.json(1)
|      Launch Configs: coreclr(2)
Southclaws commented 6 years ago

I've been experiencing this too since the last update. Changing the render mode makes no difference,

From what I can tell, it gets progressively worse over time. Every 5 or 10 minutes I need to recreate the terminal and it's back to normal.

Here's my --status:

Version:          Code 1.25.0 (0f080e5267e829de46638128001aeb7ca2d6d50e, 2018-07-05T13:11:58.697Z)
OS Version:       Windows_NT x64 10.0.17134
CPUs:             Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz (8 x 3403)
Memory (System):  15.96GB (7.00GB free)
VM:               0%
Screen Reader:    no
Process Argv:     C:\Program Files\Microsoft VS Code\Code.exe
GPU Status:       2d_canvas:                    enabled
                  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:                disabled_software
                  video_decode:                 enabled
                  video_encode:                 enabled
                  vpx_decode:                   enabled
                  webgl:                        enabled
                  webgl2:                       enabled
CPU %   Mem MB     PID  Process
    0       80   41020  code main
    0       62   34436     shared-process
    0       58   46280     gpu-process
    0      234   47692     window (settings.json - warehouse - Visual Studio Code [Administrator])
    0       14   13588       watcherService
    0        5   42664         console-window-host (Windows internal process)
    0       22   37804       terminal
    0        6   29752         winpty-process
    0        4   28416           "C:\Program Files\Git\bin\bash.exe"
    0        9   49520             "C:\Program Files\Git\bin\..\usr\bin\bash.exe"
    0        7   49860           console-window-host (Windows internal process)
    0       83   38856       extensionHost
    0       29    3316         C:\Users\Southclaw\.vscode\extensions\ms-vsliveshare.vsliveshare-0.3.379\dotnet_modules\vsls-agent.exe --autoexit --pipe ffc5799415e34921a27ce682ba50d930 --service https://insiders.liveshare.vsengsaas.visualstudio.com/
    0        5   47356           console-window-host (Windows internal process)
    0       58   45796         electron_node jsonServerMain.js
    0       23   48808       searchService
    0      147   48816     window (errors.inc - gamemode - Visual Studio Code [Administrator])
    0       10    1648       electron-crash-reporter
    0       31   45712       extensionHost
    0       27   43572         C:\Users\Southclaw\.vscode\extensions\ms-vsliveshare.vsliveshare-0.3.379\dotnet_modules\vsls-agent.exe --autoexit --pipe 851fa53c070348f1b3cd34df8a520256 --service https://insiders.liveshare.vsengsaas.visualstudio.com/
    0        4   49496           console-window-host (Windows internal process)
    0       19   48688         electron_node jsonServerMain.js
    0       12   47760       watcherService
    0        4   51044         console-window-host (Windows internal process)
    0       19   50800       terminal
    0        4   29476         winpty-process
    0        4   21424           "C:\Program Files\Git\bin\bash.exe"
    0        6   40300             "C:\Program Files\Git\bin\..\usr\bin\bash.exe"
    0        6   29728           console-window-host (Windows internal process)
Workspace Stats:
|  Window (errors.inc - gamemode - Visual Studio Code [Administrator])
|  Window (settings.json - warehouse - Visual Studio Code [Administrator])
|    Folder (warehouse): 1283 files
|      File types: inc(308) go(271) c(105) html(52) 3(48) h(46) md(37) txt(31)
|                  cpp(30) pwn(25)
|      Conf files: makefile(12) cmake(10) tasks.json(3) settings.json(2)
|                  sln(1)
|    Folder (gamemode): 1848 files
|      File types: inc(367) go(271) h(111) c(110) cpp(97) md(70) txt(67)
|                  map(63) json(59) html(52)
|      Conf files: makefile(29) cmake(20) tasks.json(17) settings.json(6)
|                  sln(4)
Tyriar commented 6 years ago

@phil-harmoniq did you try the DOM rendererType?

@Southclaws did you relaunch the terminal after setting rendererType? There isn't really anything that looks bad in your --status, all terminal processes and the gpu-process are low memory and 0 cpu :confused:

Southclaws commented 6 years ago

Yeah I've tried both render types and done restarts after changing.

Tyriar commented 6 years ago

@Southclaws does closing all windows and running code --disable-gpu help? You can also try updating your graphics card drivers.

Southclaws commented 6 years ago

I haven't updated my drivers in a while, so I'll give that a shot. --disable-gpu seemed to make it better so I guess it's that.

phil-harmoniq commented 6 years ago

I will try using the DOM renderer once I get back home. However, I do know that I am using the latest graphics drivers available from Nvidia.

phil-harmoniq commented 6 years ago

The integrated terminal is still very sluggish when using the DOM renderer, but it seems to not completely freeze VS Code at least.

phil-harmoniq commented 6 years ago

I just tested this while booted into Ubuntu 18.04, and it is also having this issue. I don't think this is isolated to Windows; however, my Macbook Pro seems to be immune. In macOS VS Code will still show the popup "The standard renderer appears to be slow" but I don't experience any slow down.

Edit: I also just tried this on my Surface Pro which has no dedicated GPU, and it also experiences this issue.

Tyriar commented 6 years ago

@phil-harmoniq that popup should only appear if the first 10 frames render time averages to over 50ms. You may not perceive this but it's very slow and something has gone wrong, it's meant to be around 1-3ms. Thanks for the feedback

jpayne commented 6 years ago

I'm having this problem as well. The Ubuntu 18.04 integrated terminal freezes, memory usage skyrockets (> 8 GB), and Windows 10 eventually realizes VS Code is unresponsive and prompts me to reopen or close it.

I updated to the latest Quadro drivers from Nvidia, but the lockups are still happening.

Here's the code --status output:

Version:          Code 1.25.0 (0f080e5267e829de46638128001aeb7ca2d6d50e, 2018-07-05T13:11:58.697Z)
OS Version:       Windows_NT x64 10.0.17134
CPUs:             Intel(R) Xeon(R) CPU E3-1505M v5 @ 2.80GHz (8 x 2808)
Memory (System):  63.90GB (56.98GB free)
VM:               67%
Screen Reader:    no
Process Argv:     C:\Program Files\Microsoft VS Code\Code.exe
GPU Status:       2d_canvas:                    enabled
                  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:                disabled_software
                  video_decode:                 enabled
                  video_encod:                 enabled
                  vpx_decode:                   enabled
                  webgl:                        enabled
                  webgl2:                       enabled
CPU %   Mem MB     PID  Process
    0       80    9564  code main
    3      301    1488     window (settings.json - Visual Studio Code)
    0       55    3720       extensionHost
    0       56    1928         electron_node jsonServerMain.js
    0       11    6776       electron-crash-reporter
    0       32   10560       terminal
    0        6    2224         winpty-process
    0        5    7060           C:\WINDOWS\System32\wsl.exe
    0        5    5248             C:\Windows\System32\lxss\wslhost.exe {9642d074-c80d-4351-84c3-a7d01787a50d} 392 400 404
    0       11    6316               console-window-host (Windows internal process)
    0        9    8900           console-window-host (Windows internal process)
    0       72    2052     shared-process
   13     2731    3652     gpu-process
Tyriar commented 6 years ago

@jpayne code --disable-gpu will probably workaround your problem

jpayne commented 6 years ago

That seems to have stopped it from crashing @Tyriar, but rendering is now quite slow. I've never had to do this with previous version of VS Code FWIW.

WilliamR1987 commented 6 years ago

I have been experiencing this since upgrading to 1.24 and still having it at 1.25:1 (upgraded on July 11, 2018). None of the previously recommended fixes solved this problem.

code --status

Version:          Code 1.25.1 (1dfc5e557209371715f655691b1235b6b26a06be, 2018-07-11T15:43:53.668Z)
OS Version:       Windows_NT x64 10.0.17134
CPUs:             Intel(R) Xeon(R) CPU E5-2623 v4 @ 2.60GHz (8 x 2594)
Memory (System):  31.92GB (25.28GB free)
VM:               0%
Screen Reader:    no
Process Argv:     C:\Program Files\Microsoft VS Code\Code.exe
GPU Status:       2d_canvas:                    enabled
                  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:                disabled_software
                  video_decode:                 enabled
                  video_encode:                 enabled
                  vpx_decode:                   enabled
                  webgl:                        enabled
                  webgl2:                       enabled
CPU %   Mem MB     PID  Process
    0       87   38708  code main
    0      133     476     gpu-process
    0       78   30784     shared-process
    0       55   35812     window (undefined)
    0      286   40828     window (Preview How to Code this App.md - REACT - Visual Studio Code)
    0       36   38556       searchService
    0      107   39196       extensionHost
    0       33   41364       terminal
    0        6   44652         winpty-process
    0        5   42060           "C:\Program Files\Git\bin\bash.exe"
    0       10   42528             "C:\Program Files\Git\bin\..\usr\bin\bash.exe"
    0        9   45208           console-window-host (Windows internal process)
    0       11   42808       electron-crash-reporter
    0       14   42844       watcherService
    0       10   41976         console-window-host (Windows internal process)
Workspace Stats:
|  Window (Preview How to Code this App.md - REACT - Visual Studio Code)
|    Folder (REACT): 192 files
|      File types: js(63) css(31) json(30) html(18) md(11) gitignore(10)
|                  svg(10) ico(10) jpg(9)
|      Conf files: package.json(10)
caugner commented 6 years ago

Same here (note the high CPU % from the gpu-process):

$ code --status

Version:          Code 1.25.1 (1dfc5e557209371715f655691b1235b6b26a06be, 2018-07-11T15:43:53.668Z)
OS Version:       Windows_NT x64 10.0.17134
CPUs:             Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz (4 x 2694)
Memory (System):  11.91GB (4.84GB free)
VM:               0%
Screen Reader:    no
Process Argv:     C:\Program Files\Microsoft VS Code\Code.exe
GPU Status:       2d_canvas:                    enabled
                  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:                disabled_software
                  video_decode:                 enabled
                  video_encode:                 enabled
                  vpx_decode:                   unavailable_software
                  webgl:                        enabled
                  webgl2:                       enabled

CPU %   Mem MB     PID  Process
    0       85   10772  code main
   14     1515   10908     gpu-process
    6      205   11120     window (package.json - *** - Visual Studio Code)
    0       11   11040       electron-crash-reporter
    0       32   11892       terminal
    0        6   12128         winpty-process
    0        9   12140           console-window-host (Windows internal process)
    0        5   12244           "C:\Program Files\Git\bin\bash.exe"
    0        9   12264             "C:\Program Files\Git\bin\..\usr\bin\bash.exe"
    0       73   12476       extensionHost
    0       43   14232         electron_node jsonServerMain.js
    0       20   13292       watcherService
    0        8   12300         console-window-host (Windows internal process)
    0       64   11336     shared-process
Workspace Stats:
|  Window (package.json - ***- Visual Studio Code)
|    Folder (***): 149 files
|      File types: js(86) gql(26) vue(21) json(7) lock(1) eslintignore(1)
|                  env(1) ico(1) html(1) yml(1)
|      Conf files: package.json(1) jsconfig.json(1) launch.json(1)
|                  settings.json(1)
|      Launch Configs: node(2)
albertcjr commented 6 years ago

tried adding "terminal.integrated.rendererType": "dom" it works! Thanks so much! Mr. @Tyriar

archcomet commented 6 years ago

I am also running into the same or similar problem with the terminal. And I can reproduce a freeze on my system 100%. For repo:

1) open vscode (do not need any code files open) 2) get bit of content into the terminal. code --status is sufficient. 3) increase the size of the terminal by dragging the frame up; OR scroll up and down within in the terminal window a few times.

After these steps all of vscode will freeze, eventually ending with a "This window is no longer responding." error.

While it is frozen, this is the output from code --status from another terminal:


Version:          Code 1.25.1 (1dfc5e557209371715f655691b1235b6b26a06be, 2018-07-11T15:43:53.668Z)
OS Version:       Windows_NT x64 10.0.16299
CPUs:             Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz (12 x 2904)
Memory (System):  31.74GB (22.12GB free)
VM:               0%
Screen Reader:    no
Process Argv:     C:\Program Files\Microsoft VS Code\Code.exe
GPU Status:       2d_canvas:                    enabled
                  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:                disabled_software
                  video_decode:                 enabled
                  video_encode:                 enabled
                  vpx_decode:                   enabled
                  webgl:                        enabled
                  webgl2:                       enabled
CPU %   Mem MB     PID  Process
    0       87    7508  code main
    2      338    4632     window (niflheim - Visual Studio Code)
    0       13    6904       electron-crash-reporter
    0       75   11448       extensionHost
    0       62    7636         electron_node jsonServerMain.js
    0       57   18708         electron_node tslintServer.js
    0      111   20432         electron_node electronForkStart.js tsserver.js
    0       39   10160           electron_node typingsInstaller.js tsserver.js typesMap.js
    0       34   19628       terminal
    0        6    1792         winpty-process
    0       10   18412           console-window-host (Windows internal process)
    0        5   19516           "C:\Program Files\Git\bin\bash.exe"
    0       10   13864             "C:\Program Files\Git\bin\..\usr\bin\bash.exe"
    0       11   21028       watcherService
    0       10    3892         console-window-host (Windows internal process)
    3      775    5728     gpu-process
    0       69   10912     shared-process

Workspace Stats:
|  Window (niflheim - Visual Studio Code)
|    Folder (niflheim): 59 files
|      File types: ts(19) js(13) map(12) json(9) editorconfig(1) gitignore(1)
|                  env(1) prettierrc(1) md(1) sql(1)
|      Conf files: package.json(1) tsconfig.json(1) tslint.json(1)
|                  webpack.config.js(1) launch.json(1) settings.json(1)
|      Launch Configs: node

I am running the latest drivers on my system.

Both running code --disable-gpu or setting "terminal.integrated.rendererType": "dom" work around the issue and prevent the freezing.

Happy to act as a guinea pig or provide more details if it helps get this resolved :)

Tyriar commented 6 years ago

@archcomet did you get the slow renderer notification before setting terminal.integrated.rendererType?

archcomet commented 6 years ago

@Tyriar I do not recall seeing any notifications.

nitrologic commented 6 years ago

I just got a Window not responding running a git log command which is interactive.

gitlogcrash

Version: Code 1.25.1 (1dfc5e557209371715f655691b1235b6b26a06be, 2018-07-11T15:43:53.668Z) OS Version: Windows_NT x64 10.0.17134 CPUs: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (8 x 3392) Memory (System): 15.91GB (9.72GB free) VM: 0% Screen Reader: no Process Argv: C:\Program Files\Microsoft VS Code\Code.exe GPU Status: 2d_canvas: enabled 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: disabled_software video_decode: enabled video_encode: enabled vpx_decode: unavailable_software webgl: enabled webgl2: enabled CPU % Mem MB PID Process 0 82 9208 code main 0 388 6824 gpu-process 0 366 9404 window (office.js - nztg-calendar - Visual Studio Code) 0 32 4468 terminal 0 6 3144 winpty-process 0 9 4304 console-window-host (Windows internal process) 0 65 7284 C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe 0 31 9588 terminal 0 5 9632 winpty-process 0 6 9640 console-window-host (Windows internal process) 0 31 9684 C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe 0 3 10388 "C:\WINDOWS\system32\bash.exe" 0 3 10664 C:\WINDOWS\System32\lxss\wslhost.exe {b433f836-468c-4669-8e9e-25aa94d244c4} 404 412 416 0 7 10672 console-window-host (Windows internal process) 0 92 9816 extensionHost 0 64 2624 python completion.py 0 6 8504 console-window-host (Windows internal process) 0 15 9956 C:\Users\Simon\AppData\Local\Programs\Python\Python36-32\python.exe c:\Users\Simon\.vscode\extensions\ms-python.python-2018.7.1\pythonFiles\jedi\evaluate\compiled\subprocess\__main__.py c:\Users\Simon\.vscode\extensions\ms-python.python-2018.7.1\pythonFiles 0 6 9708 console-window-host (Windows internal process) 0 34 3644 electron_node cssServerMain.js 0 105 11016 electron_node electronForkStart.js tsserver.js 0 32 10768 electron_node typingsInstaller.js tsserver.js typesMap.js 0 8 9836 electron-crash-reporter 0 10 9912 watcherService 0 6 9920 console-window-host (Windows internal process) 0 31 11604 searchService 0 69 10196 shared-process Workspace Stats: | Window (office.js - nztg-calendar - Visual Studio Code) | Folder (nztg-calendar): 157 files | File types: py(57) pyc(50) html(9) sh(6) svg(5) bat(5) jpg(4) png(3) | js(3) ico(2) | Conf files: launch.json(1) | Launch Configs: chrome(2)

angel-urena commented 6 years ago

I'm also having this issue on a new Dell XPS laptop I got yesterday. I wanted to share that downgrading my laptop's resolution from 4K to 1080p solves the slugginesh / crashing completely, but it looks less sharp, so I wish there was another solution.

I tried changing the renderer type to dom, which does help diminish the crashes, but the response time when typing is much slower.

nocduro commented 6 years ago

I'm also having crashes on an XPS 13 with 4k display. I haven't tried any steps to diagnose/fix it yet, just been using separate powershell window instead of the integrated terminal.

archcomet commented 6 years ago

@angel-urena might be on to something. I am also on a new Dell XPS with a 4K display. Can confirm that lowering the resolution also prevents the crashing.

phil-harmoniq commented 6 years ago

Good observation, all of my screens are 4K-ish (4K monitor, retina MacBook Pro, Surface Pro 4)

Lncn commented 6 years ago

Can confirm. 4K monitor here and VS code crashes if I increase the size of the terminal pane. However, I did get an intelligent pop up from VS Code at one point linking me here: https://code.visualstudio.com/docs/editor/integrated-terminal#_changing-how-the-terminal-is-rendered

It said this:

The standard renderer for the integrated terminal appears to be slow on your computer. Would you like to switch to the alternative DOM-based renderer which may improve performance? Read more about terminal settings.

EDIT: This does appear to fix the issue.

caugner commented 6 years ago

Same here (4K display).

EDIT: Switching to the alternative DOM-based renderer does improve the performance, but it still lags. I found that the performance decreases with an increasing height of the terminal panel.

jpayne commented 6 years ago

Yep, 4K here too.

On Tue, Aug 7, 2018, at 4:35 AM, Claas Augner wrote:

Same here (4K display).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub[1], or mute the thread[2].

Links:

  1. https://github.com/Microsoft/vscode/issues/53782#issuecomment-410978750
  2. https://github.com/notifications/unsubscribe-auth/AAVQXyDN_T6ki7G2hCO7nj8v4HYaWxFWks5uOVFBgaJpZM4VGYNT
Tyriar commented 6 years ago

Well it's definitely looking like it's a 4K monitor problem, I'll see if I can get my hands on one

nexussays commented 6 years ago

Also been having this problem for a while now. In addition to the 4k monitor (Surface Book here) as the slowdown appears to get worse over time, the problem also seems to be exacerbated when progress spinners/bars are being displayed (e.g., npm install, docker push). I presume this is due to the clearing and redraws to get the animated effect in the terminal? Not sure if that helps in debugging but perhaps makes it easier to repro.

ThadHouse commented 6 years ago

Confirming this happens on a 4K HP Spectre 13. Definitely an annoying bug. NPM commands easily seem to reproduce it on my machine.

kylebrandt commented 6 years ago

FWIW slight variation - I have 3x 2560x1600 monitors in a row and also get the lagging. Code is maximized to a single window, can type faster then the terminal can echo (and I don't type that fast :P ). --no-gpu / dom is ... maybe better? Still slow and cpu spikes with terminal usage. Other parts of the editor (text editor windows) are responsive.

Ubuntu 18.04:

$ code --version
1.26.0
4e9361845dc28659923a300945f84731393e210d
x64

I have also noticed that when the terminal is selected in the bottom panel, changing the height of the bottom panel is laggy/choppy. If I switch to a different item in the bottom panel, such as "Problems" and change the height I don't get that same lag. I get the same behavior with the "bottom panel" being changed to be docked to the right. I can also confirm the the lag increases along with increasing the size of the terminal.

bruce commented 6 years ago

Another confirmation of the 4k problem here (Ubuntu 18.04 on a brand new Dell XPS 9730)

MeikTranel commented 6 years ago

@Tyriar i am experiencing this in 2k(2560x1440) resolution as well;

Using dom based terminal AND --disable-gpu helps

LisannaAtHome commented 6 years ago

I am seeing this on my MacBook Pro with a 4k monitor attached, so not limited to windows.

mhoyer commented 6 years ago

Hi,

since 1.26 I experience the same issue. Setting terminal.integrated.rendererType to dom works okayish, but still slow and not GPU optimized.

OS Version:       Windows_NT x64 10.0.16299
CPUs:             Intel(R) Core(TM) i5-7440HQ CPU @ 2.80GHz (4 x 2808)
Memory (System):  15.88GB (3.31GB free)
VM:               0%
Screen Reader:    no
Process Argv:     C:\Users\m.hoyer\AppData\Local\Programs\Microsoft VS Code\Code.exe .
GPU Status:       2d_canvas:                    unavailable_software
                  checker_imaging:              disabled_off
                  flash_3d:                     unavailable_software
                  flash_stage3d:                unavailable_software
                  flash_stage3d_baseline:       unavailable_software
                  gpu_compositing:              unavailable_software
                  multiple_raster_threads:      enabled_on
                  native_gpu_memory_buffers:    disabled_software
                  rasterization:                unavailable_software
                  video_decode:                 unavailable_software
                  video_encode:                 unavailable_software
                  webgl:                        enabled_readback
                  webgl2:                       unavailable_off
CPU %   Mem MB     PID  Process
    0      135    3168  code main
    0       79     612     shared-process
    0      289   21128     window (settings.json - xxx - Visual Studio Code)
   24      106    1440       extensionHost
    0       37   18712         searchService
    0       15   10772       electron-crash-reporter
    0       12   19048       watcherService
    0       11   25480         console-window-host (Windows internal process)
    0        7   20852       winpty-process
    0        6    4192         "C:\Program Files\Git\bin\bash.exe" -l
    0       11   19400           "C:\Program Files\Git\bin\..\usr\bin\bash.exe" -l
    0       10   25716         console-window-host (Windows internal process)
    0       38   23052       searchService

I found 2d_canvas: unavailable_software in the output above which seems to be related to this issue: https://github.com/electron/electron/issues/12042

E.g. the version info of VSCode 1.26.1 shows Electron in version 2.0.5 already:


Commit: 493869ee8e8a846b0855873886fc79d480d342de
Date: 2018-08-16T18:38:57.434Z
Electron: 2.0.5
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64```
sirarthurnell commented 6 years ago

Hi, I just tried to set "terminal.integrated.rendererType": "dom" in Ubuntu 18.04 and it worked for me:

Here's the result of code --status:


(code:19766): Gtk-WARNING **: 19:24:41.824: Theme parsing error: gtk.css:6779:34: Missing opening bracket in color definition
(code:19766): Gtk-WARNING **: 19:24:41.825: Theme parsing error: gtk.css:6785:28: Missing opening bracket in color definition

Version:          Code 1.26.1 (493869ee8e8a846b0855873886fc79d480d342de, 2018-08-16T18:34:20.517Z)
OS Version:       Linux x64 4.15.0-30-generic
CPUs:             AMD Ryzen 5 2400G with Radeon Vega Graphics (8 x 2035)
Memory (System):  15.43GB (9.98GB free)
Load (avg):       1, 1, 0
VM:               0%
Screen Reader:    no
Process Argv:     /usr/share/code/code .
GPU Status:       2d_canvas:                    unavailable_software
                  checker_imaging:              disabled_off
                  flash_3d:                     unavailable_software
                  flash_stage3d:                unavailable_software
                  flash_stage3d_baseline:       unavailable_software
                  gpu_compositing:              unavailable_software
                  multiple_raster_threads:      enabled_on
                  native_gpu_memory_buffers:    disabled_software
                  rasterization:                unavailable_software
                  video_decode:                 unavailable_software
                  video_encode:                 unavailable_software
                  webgl:                        enabled_readback
                  webgl2:                       unavailable_off

CPU %   Mem MB     PID  Process
    0      142   19578  code main
    0       32   19580     zygote
    0      269   19618       window (date-math.ts - simple-calendar - Visual Studio Code)
    0        0   19644         /bin/bash
    0       47   19653         searchService
    0       95   19662         extensionHost
    0      126   19686           electron_node electronForkStart.js tsserver.js 
    0       79   19704             electron_node typingsInstaller.js tsserver.js typesMap.js 
    0       63   19735           electron_node jsonServerMain.js 
    0       63   19663         watcherService
    0       95   19711       shared-process

Workspace Stats:
|  Window (date-math.ts - simple-calendar - Visual Studio Code)
|    Folder (simple-calendar): 27 files
|      File types: ts(9) json(8) html(2) scss(2) editorconfig(1) gitignore(1)
|                  md(1) ico(1) gitkeep(1)
|      Conf files: tslint.json(2) package.json(1) tsconfig.json(1)

VS Code is unable to see it, but I have hardware acceleration (I know it, and I checked it with glxinfo | less command), the drivers that come with the Linux kernel.

Tyriar commented 6 years ago

Another workaround that may work: code --ignore-gpu-blacklist

DjavanRoa commented 6 years ago

For what it's worth I also experience sudden performance drop after a while when using integrated terminal on my Dell XPS 15 9560 w/ 4K display. Most noticed when using Powershell integrated terminal from the extention (probably because it's the one I use the most on daily basis). I've noticed that when having just vscode and chrome open, when it suddenly starts lagging Chrome lags as well with the scrolling. Closing both apps and reopening Chrome make scroll smooth again. Both my GPU drivers are up to date with latest from Intel and nvidia. After reading this https://communities.intel.com/thread/119093 I've tryed disabling the nvidia GPU to prevent the current discret GPU issue, it seems to be less sensitive to falling in lag state. Not a solution though...

mhoyer commented 6 years ago

Another workaround that may work: code --ignore-gpu-blacklist

Thanks @Tyriar, this works for me. Changing terminal.integrated.rendererType back to canvas now makes the Terminal as fast as before. 👍

Tyriar commented 6 years ago

I'm going to close this issue in favor of the following 2 issues as they're more targeted: