microsoft / vscode

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

High CPU usage from "gpu-process" and low framerate when scrolling througheven small (<200) line files #215743

Closed shamblesides closed 3 months ago

shamblesides commented 3 months ago

Type: Performance Issue

Open VSCode, scroll in any file

VS Code version: Code 1.90.1 (611f9bfce64f25108829dd295f54a6894e87339d, 2024-06-11T21:02:43.666Z) OS version: Linux x64 5.4.0-186-generic snap Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz (4 x 3838)| |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_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|3, 2, 1| |Memory (System)|15.51GB (13.11GB free)| |Process Argv|--force-user-env --no-sandbox --use-gl=angle --use-angle=swiftshader --crash-reporter-id e0f135e1-7239-4cd0-b59d-cca27bb39cbb| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|xubuntu| |XDG_CURRENT_DESKTOP|XFCE| |XDG_SESSION_DESKTOP|xubuntu| |XDG_SESSION_TYPE|x11|
Process Info ``` CPU % Mem MB PID Process 0 159 3514 code main 0 32 3516 zygote 0 32 3517 zygote 0 318 3575 window [1] (index.html - vpet - Visual Studio Code) 0 95 3973 window [2] (Issue Reporter) 3 238 3542 gpu-process 0 64 3549 utility-network-service 0 143 3799 extensionHost [1] 0 111 3851 electron-nodejs (tsserver.js ) 0 159 3852 electron-nodejs (tsserver.js ) 0 79 3878 electron-nodejs (typingsInstaller.js typesMap.js ) 0 143 3870 /snap/code/161/usr/share/code/code /snap/code/161/usr/share/code/resources/app/extensions/html-language-features/server/dist/node/htmlServerMain --node-ipc --clientProcessId=3799 0 127 3809 shared-process 0 0 3984 /bin/sh -c /usr/bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= 0 0 3985 /usr/bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= 0 79 3810 fileWatcher [1] ```
Workspace Info ``` | Window (index.html - vpet - Visual Studio Code) | Folder (vpet): 11379 files | File types: o(1310) json(1157) timestamp(1153) d(1002) rmeta(813) | rlib(637) txt(270) png(82) bin(81) so(41) | Conf files: package.json(1); ```
Extensions (15) Extension|Author (truncated)|Version ---|---|--- vscode-wasm|dts|1.4.1 gitlens|eam|15.1.0 haxe-hl|Hax|1.4.14 rainbow-csv|mec|3.12.0 debugpy|ms-|2024.6.0 isort|ms-|2023.10.1 python|ms-|2024.8.1 vscode-pylance|ms-|2024.6.1 cpptools|ms-|1.20.5 vshaxe|nad|2.31.0 markdown-preview-enhanced|shd|0.8.13 even-better-toml|tam|0.19.2 vim|vsc|1.27.3 haxe-extension-pack|vsh|1.3.0 hxcpp-debugger|vsh|1.2.4
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscorecescf:30445987 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 jchc7451:31067544 chatpanelc:31048052 dsvsc021:30996838 945dj816:31013170 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 pythonprt:31056678 dwnewjupyter:31046869 newcmakeconfigv2:31071590 ```
shelvesdragon commented 3 months ago

This is likely caused by the temporary fix in version 1.90.1 on the snap package that switched the OpenGL backend to software emulation in order to prevent the crashes reported with version 1.90.0 in #212494 . If it is related, your options for now are mentioned in this comment: https://github.com/microsoft/vscode/issues/212494#issuecomment-2168072242 Hope this helps!

deepak1556 commented 3 months ago

Merging to https://github.com/microsoft/vscode/issues/212494, please follow the issue for updates.