microsoft / vscode

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

Git operations in VSCode UI slower than usual #116020

Closed Alonski closed 3 years ago

Alonski commented 3 years ago

Issue Type: Performance Issue

For the past month or more Git operations done in VSCode are quite slow. An example is when commiting from the Source Control tab I:

  1. Have files staged or changed
  2. Add a commit message
  3. Hit Ctrl+Enter to commit.
  4. The UI shows a loader and it seems that committing takes a long time.

In reality as soon at I hit Ctrl+Enter the commit takes place. Testing this via the integrated terminal shows as such.

There were earlier issues surrounding this but not real resolution: https://github.com/microsoft/vscode/issues/34898

GIF of UI: Long version: vscode-commit-slow

Short version (cut 1000+ frames): vscode-commit-slow-short

Video: https://user-images.githubusercontent.com/452199/107141895-4f9f7c00-6934-11eb-9b61-bb347113ffc7.mp4

VS Code version: Code 1.53.0 (8490d3dde47c57ba65ec40dd192d014fd2113496, 2021-02-03T20:36:38.611Z) OS version: Windows_NT x64 10.0.20257 Remote OS version: Linux x64 4.19.128-microsoft-standard Remote OS version: Linux x64 4.19.128-microsoft-standard

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz (12 x 2592)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|15.79GB (1.90GB free)| |Process Argv|--crash-reporter-id affaced2-e45e-4caa-b7ea-a82c72cafa56| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|WSL: Ubuntu| |OS|Linux x64 4.19.128-microsoft-standard| |CPUs|Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz (12 x 2592)| |Memory (System)|7.66GB (2.19GB free)| |VM|0%| |Item|Value| |---|---| |Remote|WSL: Ubuntu| |OS|Linux x64 4.19.128-microsoft-standard| |CPUs|Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz (12 x 2592)| |Memory (System)|7.66GB (2.19GB free)| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 1 72 66052 code main 0 138 13652 gpu-process 0 7 16520 crashpad-handler 3 261 16620 window (sections.js - camilyo - Visual Studio Code [Administrator]) 0 301 33272 extensionHost 0 14 2776 electron_node server.js 0 58 6188 electron_node start-server.js 0 41 16376 electron_node eslintServer.js 0 15 17456 "C:\Program Files\Microsoft VS Code\Code.exe" "c:\Program Files\Microsoft VS Code\resources\app\extensions\html-language-features\server\dist\node\htmlServerMain" --node-ipc --clientProcessId=33272 0 112 23816 electron_node tsserver.js 0 28 21268 electron_node typingsInstaller.js typesMap.js 0 25 33068 "C:\Program Files\Microsoft VS Code\Code.exe" "c:\Program Files\Microsoft VS Code\resources\app\extensions\css-language-features\server\dist\node\cssServerMain" --node-ipc --clientProcessId=33272 0 10 40732 electron_node server.js 0 53 48168 "C:\Program Files\Microsoft VS Code\Code.exe" "c:\Program Files\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\node\jsonServerMain" --node-ipc --clientProcessId=33272 0 18 61160 electron_node server.js 0 15 70344 electron_node tsserver.js 0 5 51660 watcherService 0 1 35588 console-window-host (Windows internal process) 0 16 82668 searchService 0 110 26352 window (config.js - baseui [WSL: Ubuntu] - Visual Studio Code [Administrator]) 0 45 18896 extensionHost 0 9 34028 electron_node wslDaemon.js 0 1 64504 C:\WINDOWS\System32\wsl.exe -d Ubuntu sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 8490d3dde47c57ba65ec40dd192d014fd2113496 stable .vscode-server 0 ' 0 1 12992 C:\WINDOWS\system32\lxss\wslhost.exe --mode 2 --distro-id {247cf2e4-a10e-49d9-8c94-3f958df93098} --vm-id {5c7e05a5-dc29-4aa7-abf3-09e36fb47afd} --handle 508 --event 536 --parent 540 0 1 22156 console-window-host (Windows internal process) 0 1 29664 console-window-host (Windows internal process) 2 50 28936 shared-process 0 95 32632 window (decrypt.c - targil-4 [WSL: Ubuntu] - Visual Studio Code [Administrator]) 0 31 75440 extensionHost 0 7 78624 electron_node wslDaemon.js 0 18 35152 utility 0 75 86616 window (Issue Reporter) Remote: WSL: Ubuntu Remote: WSL: Ubuntu ```
Workspace Info ``` | Window (sections.js - camilyo - Visual Studio Code [Administrator]) | Folder (camilyo): more than 20318 files | File types: png(11737) js(2797) svg(1685) hbs(1085) gif(325) jpg(253) | scss(146) css(128) json(74) cur(20) | Conf files: package.json(4) launch.json(2) settings.json(2) | tasks.json(1) grunt.js(1) jsconfig.json(1) | Launch Configs: node(2) chrome(2); ```
Extensions (50) Extension|Author (truncated)|Version ---|---|--- Bookmarks|ale|12.1.4 project-manager|ale|12.0.1 camilyo-vscode-extensions|Alo|0.0.4 ember-related-files-windows|Alo|1.1.0 Handlebars|and|0.4.1 atlascode|atl|2.8.5 tailwind-docs|aus|1.4.0 markdown-mermaid|bie|1.9.1 vscode-coverage-highlighter|bra|1.0.3 ember-module-snippets|can|1.3.121 npm-intellisense|chr|1.3.1 path-intellisense|chr|2.3.0 vsc-ember-frost|cie|0.0.2 bracket-pair-colorizer|Coe|1.0.61 vscode-svgviewer|css|2.0.0 vscode-markdownlint|Dav|0.38.0 vscode-eslint|dba|2.1.14 eslint-disable-snippets|drK|1.3.0 gitlens|eam|11.2.1 vscode-npm-script|eg2|0.3.13 prettier-vscode|esb|5.9.1 vscode-pull-request-github|Git|0.23.0 vscode-guid|hea|1.4.20 RelativePath|jak|1.4.0 docthis|joe|0.7.1 vscode-peacock|joh|3.9.1 vscode-ember-unstable|lif|2.0.10 vscode-glimmer-syntax|lif|1.0.1 yarn-lock-syntax|mar|0.1.3 vscode-remark|mrm|1.2.1 remote-wsl|ms-|0.53.2 azure-account|ms-|0.9.5 vsliveshare|ms-|1.0.3629 debugger-for-chrome|msj|4.12.12 color-highlight|nau|2.3.0 EmberES6Snippets|pha|2.3.3 vscode-yaml|red|0.14.0 classlens|rex|0.7.1 postcss|ric|2.0.0 vscode-javascript-booster|sbu|14.0.1 code-settings-sync|Sha|3.4.3 code-spell-checker|str|1.10.2 sass-indented|syl|1.8.15 sort-lines|Tyr|1.9.0 vscode-icons|vsc|11.1.0 vscode-wakatime|Wak|5.0.0 ember-concurrency-vscode-snippets|Yno|0.0.1 markdown-all-in-one|yzh|3.4.0 vscode-caddyfile-syntax|zam|1.0.4 vscode-open-in-github|ziy|1.3.6 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 openlogontheside:30221877 python383cf:30185419 pythonvspyt617cf:30253240 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30211402 wsl2prompt:30224612 pythonvsdeb440:30248342 unusedpromptcf:30224611 folderexplorer:30224614 openfilemenucf:30224648 pythonvsded773:30248341 pythonvspyt875:30251590 ```
gjsjohnmurray commented 3 years ago

Please check if the problem still occurs if you reload with all extensions disabled.

Alonski commented 3 years ago

@gjsjohnmurray Still happens with extensions disabled.

eamodio commented 3 years ago

Does this only happen with one repo? How long does a git status -u take?

Alonski commented 3 years ago

@eamodio It happens in our largest repo on Windows. For all other repos I use WSL, and they are much smaller, so I don't feel this as much. Other repos are also don't feel snappy doing Git operations but definitely don't take minutes to finish.

git status -u in Powershell integrated terminal takes around 1s.

ghost commented 3 years ago

I have the same problem, was there change in recent build?