microsoft / vscode

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

LiveShare Slow after a few hours use #165155

Closed test137E29B closed 2 years ago

test137E29B commented 2 years ago

Type: Performance Issue

After using liveshare for a while, IO operations appear to lag heavily. Searching files, saving files, and attempting to jump to functions and other areas of code, as well as F2 replace of variable/function names is near impossible with each action taking minutes. The project is a Javascript React project, incase this helps narrow down something specific though I have experienced this with all kinds of JS and TS projects with both M1 Macbook Pro, and 2016 Macbook Pro models as hosts.

This computer is the connection to live share, with the Host being an M1 Macbook Pro - performing any of these actions on the Host computer works flawlessly which leads me to believing it's liveshare's problem.

After disconnecting from the live session, restarting VSCode, and reconnecting to the same live session the problem is resolved for another hour or two after which it reoccurs. I don't think this is a memory leak or related to memory as I have plenty free (over 40GB free) as the included sysinfo should show. CPU usage is also under or around 25% for the Code instance and this doesn't rise.

I'm at a bit of a loss on anything I can do to diagnose further though as it's not easily reproducable in a quick amount of time - only after an hour or two of use.

VS Code version: Code - Insiders 1.73.0-insider (3544aabd5a2b0da2cd3a6f3fa3f00759aa9d9709, 2022-10-27T21:34:51.585Z) OS version: Windows_NT x64 10.0.19043 Modes: Sandboxed: Yes

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (16 x 3600)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|63.93GB (46.23GB free)| |Process Argv|--crash-reporter-id 1274adda-145d-4536-81dd-31f25d9fa962| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 0 119 12220 code-insiders main 0 124 3200 shared-process 0 83 13164 fileWatcher 0 85 19228 fileWatcher 0 85 30468 ptyHost 0 7 1376 console-window-host (Windows internal process) 0 7 12432 console-window-host (Windows internal process) 0 6 15420 "C:\Program Files\Git\bin\bash.exe" --login 0 11 28484 "C:\Program Files\Git\bin\..\usr\bin\bash.exe" --login 0 0 33172 0 0 33380 0 0 33656 0 0 33612 0 6 32676 "C:\Program Files\Git\bin\bash.exe" --login 0 11 21212 "C:\Program Files\Git\bin\..\usr\bin\bash.exe" --login 0 41 3780 utility-network-service 18 583 9648 extension-host 0 107 8160 "C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe" --ms-enable-electron-run-as-node --max-old-space-size=3072 "c:\Program Files\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js" --serverMode partialSemantic --useInferredProjectPerProjectRoot --disableAutomaticTypingAcquisition --cancellationPipeName C:\Users\Jason\AppData\Local\Temp\vscode-typescript\7151d16fc59f18c6fcfb\tscancellation-aafab7c953c3273b035f.tmp* --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc 0 107 18328 "C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe" --ms-enable-electron-run-as-node --max-old-space-size=3072 "c:\Program Files\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js" --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName C:\Users\Jason\AppData\Local\Temp\vscode-typescript\7151d16fc59f18c6fcfb\tscancellation-5cb74823cba71d06380f.tmp* --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc 0 101 18340 "C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe" --ms-enable-electron-run-as-node "c:/Program Files/Microsoft VS Code Insiders/resources/app/extensions/node_modules/typescript/lib/typingsInstaller.js" --globalTypingsCacheLocation C:/Users/Jason/AppData/Local/Microsoft/TypeScript/4.8 --enableTelemetry --typesMapLocation "c:/Program Files/Microsoft VS Code Insiders/resources/app/extensions/node_modules/typescript/lib/typesMap.json" --validateDefaultNpmLocation 0 83 21280 "C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe" --ms-enable-electron-run-as-node -e "delete process.env.ELECTRON_RUN_AS_NODE;require(process.argv[1])" c:\Users\Jason\.vscode-insiders\extensions\ms-vsliveshare.vsliveshare-1.0.5750\out\prod\speaker\out\speaker.js 0 84 28212 "C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe" --ms-enable-electron-run-as-node "c:\Program Files\Microsoft VS Code Insiders\resources\app\extensions\json-language-features\server\dist\node\jsonServerMain" --node-ipc --clientProcessId=9648 15 570 10820 extension-host 0 86 16648 "C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe" --ms-enable-electron-run-as-node "c:\Program Files\Microsoft VS Code Insiders\resources\app\extensions\css-language-features\server\dist\node\cssServerMain" --node-ipc --clientProcessId=10820 0 108 17968 "C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe" --ms-enable-electron-run-as-node --max-old-space-size=3072 "c:\Program Files\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js" --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName C:\Users\Jason\AppData\Local\Temp\vscode-typescript\aa3e3c8e3f7797c1f8a6\tscancellation-ffaee95f5b5636fb4b5a.tmp* --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc 0 102 22708 "C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe" --ms-enable-electron-run-as-node "c:/Program Files/Microsoft VS Code Insiders/resources/app/extensions/node_modules/typescript/lib/typingsInstaller.js" --globalTypingsCacheLocation C:/Users/Jason/AppData/Local/Microsoft/TypeScript/4.8 --enableTelemetry --typesMapLocation "c:/Program Files/Microsoft VS Code Insiders/resources/app/extensions/node_modules/typescript/lib/typesMap.json" --validateDefaultNpmLocation 0 84 30952 "C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe" --ms-enable-electron-run-as-node "c:\Program Files\Microsoft VS Code Insiders\resources\app\extensions\json-language-features\server\dist\node\jsonServerMain" --node-ipc --clientProcessId=10820 0 108 32752 "C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe" --ms-enable-electron-run-as-node --max-old-space-size=3072 "c:\Program Files\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js" --serverMode partialSemantic --useInferredProjectPerProjectRoot --disableAutomaticTypingAcquisition --cancellationPipeName C:\Users\Jason\AppData\Local\Temp\vscode-typescript\aa3e3c8e3f7797c1f8a6\tscancellation-75d9e6595d0253c7ce7d.tmp* --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc 0 84 33540 "C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe" --ms-enable-electron-run-as-node -e "delete process.env.ELECTRON_RUN_AS_NODE;require(process.argv[1])" c:\Users\Jason\.vscode-insiders\extensions\ms-vsliveshare.vsliveshare-1.0.5750\out\prod\speaker\out\speaker.js 0 173 15620 gpu-process 0 263 15752 window (index.js - Visual Studio Live Share (Workspace) - Visual Studio Code - Insiders [Administrator]) 0 96 26176 issue-reporter 0 218 32160 window (Visual Studio Live Share (Workspace) - Visual Studio Code - Insiders [Administrator]) 0 28 33056 crashpad-handler ```
Workspace Info ``` | Window (index.js - Visual Studio Live Share (Workspace) - Visual Studio Code - Insiders [Administrator]) | Folder (vsls:/): Workspace stats not available. | Window (Visual Studio Live Share (Workspace) - Visual Studio Code - Insiders [Administrator]) | Folder (vsls:/): Workspace stats not available.; ```
Extensions (34) Extension|Author (truncated)|Version ---|---|--- better-comments|aar|3.0.2 vscode-styled-jsx|bla|2.1.1 simple-react-snippets|bur|1.2.7 path-intellisense|chr|2.8.1 doxdocgen|csc|1.4.0 hex-to-rgba|dak|1.0.0 vscode-markdownlint|Dav|0.48.1 es7-react-js-snippets|dsz|4.4.3 vscode-great-icons|emm|2.1.86 vsc-material-theme|Equ|33.5.0 vsc-material-theme-icons|equ|2.4.0 vscode-optimize-images|fab|1.1.1 file-icons|fil|1.0.29 node-version|fiv|0.0.1 copilot|Git|1.56.7152 remotehub|Git|0.44.0 vscode-pull-request-github|Git|0.52.0 rest-client|hum|0.25.1 discord-vscode|icr|5.8.0 useful-react-snippets|igo|3.0.0 easy-icons|jam|0.3.1 jsx-to-svg|mer|0.0.4 remote-repositories|ms-|0.22.0 vsliveshare|ms-|1.0.5750 reload|nat|0.0.6 material-icon-theme|PKi|4.21.0 code-settings-sync|Sha|3.4.3 theshukran-react-utils|the|1.0.2 errorlens|use|3.6.0 vscode-icons|vsc|12.0.1 glean|wix|5.2.2 vscode-import-cost|wix|3.3.0 change-case|wma|1.0.0 json|Zai|2.0.2 (1 theme extensions excluded)
A/B Experiments ``` vsliv695:30137379 vsins829:30139715 vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30422396 pythontb:30258533 pythonptprofiler:30281269 vshan820:30294714 pythondataviewer:30285072 vscod805cf:30301675 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30404738 cppdebug:30492333 vsclangdf:30492506 c4g48928:30535728 dsvsc012:30540252 pynewext54:30600181 pylantcb52:30590116 vscccc:30564267 pyindex848:30577858 nodejswelcome1:30587009 gswce2:30598411 34cci188:30599831 pyind779cf:30600160 ```

Once this issue occurs again, I will use the electron devtools to record a performance profile.

mjbvz commented 2 years ago

Please file this against the liveshare extension: https://github.com/MicrosoftDocs/live-share/issues