microsoft / vscode

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

VSCode lags substantially after disconnecting external monitor #211211

Closed pvande closed 5 months ago

pvande commented 5 months ago

Type: Performance Issue

I normally work with VSCode running across both my laptop's built-in Retina display and an external 4K monitor. When I disconnect my monitor, VSCode becomes extremely sluggish (multiple second delays between an input and a visible result in the worst cases). This sluggishness can usually be remdied by restarting VSCode.

VS Code version: Code 1.88.1 (e170252f762678dec6ca2cc69aba1570769a5d39, 2024-04-10T17:43:08.196Z) OS version: Darwin arm64 23.4.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M2 Max (12 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|2, 3, 4| |Memory (System)|96.00GB (0.61GB free)| |Process Argv|--crash-reporter-id ce9eebc5-56d8-4317-a121-bf6ac23cb0a6| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 72 492 67087 code main 1 98 67090 gpu-process 0 0 67091 utility-network-service 0 393 67092 window [1] (global_partial_helper.rb — nextgen-cms) 0 590 67093 window [2] (postcss.config.js — gateway-app) 14 1278 67094 window [3] (layer.rb — business-rts-game) 0 786 67096 window [5] (README.md — dragonborn) 0 197 67097 window [6] (yardopts — t-rects) 0 98 67135 ptyHost 0 0 30583 /bin/zsh -il 0 0 51229 /bin/zsh -il 0 0 67149 /bin/zsh -il 0 0 67160 /bin/zsh -il 0 0 89867 docker compose exec app sh 0 0 89868 /Applications/Docker.app/Contents/Resources/bin/com.docker.cli compose exec app sh 0 0 89870 /Users/openup/.docker/cli-plugins/docker-compose compose exec app sh 0 0 67207 /bin/zsh -il 0 0 67226 /bin/zsh -il 0 0 67251 /bin/zsh -il 0 0 67257 /bin/zsh -il 0 197 67136 extensionHost [2] 0 98 67646 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=67136 0 0 68515 /Users/openup/.cache/trunk/cli/1.7.0-darwin-arm64/trunk lsp-proxy 0 98 93281 electron-nodejs (tsserver.js ) 0 98 93282 electron-nodejs (tsserver.js ) 0 98 93287 electron-nodejs (typingsInstaller.js typesMap.js ) 0 98 67137 extensionHost [6] 0 0 67792 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=67137 0 0 69223 electron-nodejs (server.js ) 0 0 69224 electron-nodejs (server.js ) 0 98 67138 extensionHost [5] 0 0 67798 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=67138 0 0 67877 /Users/openup/.cache/trunk/cli/1.21.0-darwin-arm64/trunk lsp-proxy 4 98 67140 shared-process 0 0 67143 fileWatcher [6] 0 98 67144 fileWatcher [2] 0 197 67146 extensionHost [1] 0 0 67401 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=67146 0 0 68319 /Users/openup/.cache/trunk/cli/1.21.0-darwin-arm64/trunk lsp-proxy 0 98 67147 fileWatcher [5] 0 0 67148 fileWatcher [1] ```
Workspace Info ``` | Window (dragonruby-wasm.wasm — dragonruby-macos) | Window (yardopts — t-rects) | Window (README.md — dragonborn) | Window (mrbParser.py — MrubyDecompiler-master) | Window (layer.rb — business-rts-game) | Window (README.md — foodchain) | Window (postcss.config.js — gateway-app) | Window (mrdb.c — mruby-3.0.0) | Window (global_partial_helper.rb — nextgen-cms) | Folder (dragonruby-macos): 3549 files | File types: png(1501) txt(471) rb(288) md(74) wav(43) mp4(34) js(18) | ttf(8) c(8) css(7) | Conf files: | Folder (t-rects): 60 files | File types: rb(11) md(9) erb(2) json(2) dat(1) yaml(1) nojekyll(1) | html(1) | Conf files: dockerfile(1) | Folder (dragonborn): 257 files | File types: rb(112) txt(6) log(3) gitignore(2) yaml(2) md(2) html(2) | DS_Store(1) yml(1) css(1) | Conf files: | Folder (MrubyDecompiler-master): 67 files | File types: mrb(18) py(15) pyc(12) rb(7) md(2) txt(2) gitignore(1) | exe(1) | Conf files: | Folder (business-rts-game): 3977 files | File types: png(1407) rb(771) txt(486) md(75) wav(43) mp4(34) | DS_Store(13) ttf(8) c(8) js(7) | Conf files: | Folder (foodchain): 3 files | File types: md(1) | Conf files: | Folder (gateway-app): 1068 files | File types: png(285) rb(140) html(88) slim(86) css(55) yml(41) js(27) | svg(26) jpg(11) yaml(8) | Conf files: github-actions(4) dockerfile(2) launch.json(1) | settings.json(1) tasks.json(1) package.json(1) | Launch Configs: rdbg | Folder (mruby-3.0.0): 1137 files | File types: rb(182) d(127) o(127) c(120) pi(96) rake(64) h(50) md(21) | yml(9) gembox(9) | Conf files: github-actions(5) makefile(1) | Folder (nextgen-cms): 16827 files | File types: slim(5188) rb(1818) css(1149) svg(903) js(436) png(197) | jsx(133) ruby(128) html(85) otf(79) | Conf files: github-actions(13) dockerfile(2) settings.json(1) | jsconfig.json(1) package.json(1); ```
Extensions (31) Extension|Author (truncated)|Version ---|---|--- Bookmarks|ale|13.5.0 docs-view|bie|0.1.0 vscode-toggle-quotes|Bri|0.3.6 postcss|css|1.0.9 gitlens|eam|2024.4.2314 html-preview-vscode|geo|0.2.5 vscode-pull-request-github|Git|0.86.1 drgtk-autocomplete|HIR|0.0.3 vscode-rdbg|Koi|0.2.2 l13-diff|L13|1.3.8 vsls-whiteboard|los|0.0.12 rainbow-csv|mec|3.11.0 fluent-icons|mig|0.0.18 vscode-docker|ms-|1.29.0 remote-containers|ms-|0.354.0 atom-keybindings|ms-|3.3.0 hexeditor|ms-|1.9.14 vsliveshare|ms-|1.0.5918 typescript-explorer|mxs|0.4.2 hexeditor|not|1.8.2 yard|pav|0.4.0 vscode-xml|red|0.26.1 ruby-lsp|Sho|0.5.19 slim|sia|0.1.2 cody-ai|sou|1.15.1713625952 rewrap|stk|1.16.3 io|tru|3.16.0 sort-lines|Tyr|1.11.0 vscode-lldb|vad|1.10.0 codetour|vsl|0.0.59 vscode-zig|zig|0.5.7 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 2e7ec940:31000449 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 d34g3935:30971562 fegfb526:30981948 bg6jg535:30979843 ccp2r3:30993541 dsvsc020:30976470 pythonait:31006305 jchc7451:30973076 gee8j676:31009558 dsvsc021:30996838 jg8ic977:31013176 pythoncenvpt:31022790 ```
bpasero commented 5 months ago

Does this reproduce using https://insiders.vscode.dev with a browser too?

VSCodeTriageBot commented 5 months ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

aaronlehmann commented 3 months ago

I am also experiencing this issue quite consistency. I couldn't reproduce it with the browser version at https://insiders.vscode.dev/.