microsoft / vscode

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

Performance issues after the last update #215940

Closed tougaj closed 4 months ago

tougaj commented 4 months ago

Good afternoon!

After the last update to version 1.90.1, I started experiencing very serious performance issues with the text editor, namely, a very slow response to keystrokes. Everything is very slow. I press a key, and the response appears only after a certain time (about a second). In general, the editor works very slowly. This is clearly visible visually. Before the update to the specified version, everything worked fine. After the update, friezes appeared on several computers at once. Please tell me what can be done about it and how to solve the problem.

Sincerely, Alexander

Additional information: CPUs AMD A8-9600 RADEON R7, 10 COMPUTE CORES 4C+6G (4 x 3393) 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) 5, 6, 6 Memory (System) 15.05GB (9.43GB free) Process Argv --force-user-env --no-sandbox --use-gl=angle --use-angle=swiftshader --crash-reporter-id 510d935d-99ae-4858-ac40-691fc0983fbd Screen Reader no VM 0% CPU % Mem MB PID Process 0 123 787259 code main 0 15 787261 zygote 0 15 787262 zygote 0 524 787330 window [1] (RelationshipCard.tsx - photon (рабочая область) - tougaj - Visual Studio Code) 0 92 799553 window [3] (Средство создания отчетов о неполадках) 8 231 787292 gpu-process 0 31 787302 utility-network-service 0 46 787376 ptyHost 0 0 787438 /usr/bin/zsh -i 0 92 787407 shared-process 0 0 799571 /bin/sh -c /usr/bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= 0 0 799572 /usr/bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= 0 92 787408 fileWatcher [1] 0 154 799027 extensionHost [1] 0 108 799062 electron-nodejs (tsserver.js ) 26 894 799064 electron-nodejs (tsserver.js ) 0 62 799128 electron-nodejs (typingsInstaller.js typesMap.js ) 0 77 799081 /snap/code/161/usr/share/code/code /snap/code/161/usr/share/code/resources/app/extensions/css-language-features/server/dist/node/cssServerMain --node-ipc --clientProcessId=799027 0 92 799082 /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=799027 0 77 799098 /snap/code/161/usr/share/code/code /snap/code/161/usr/share/code/resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=799027 0 108 799260 /snap/code/161/usr/share/code/code /home/admk7/.vscode/extensions/streetsidesoftware.code-spell-checker-3.0.1/packages/_server/dist/main.cjs --node-ipc --clientProcessId=799027 Extension Author (truncated) Version better-comments aar 3.0.2 vscode-html-css ecm 2.0.10 prettier-vscode esb 10.4.0 template-string-converter meg 0.6.1 dotenv mik 1.0.1 vscode-language-pack-ru MS- 1.89.2024050109 reload nat 0.0.7 code-spell-checker str 3.0.1 code-spell-checker-russian str 2.2.2 code-spell-checker-ukrainian str 1.2.3 vscode-styled-components sty 1.7.8 sass-indented syl 1.8.29 vscode-icons vsc 12.8.0 vim vsc 1.27.3 (1 theme extensions excluded) vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 jchc7451:31067544 dsvsc021:30996838 jg8ic977:31013176 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 pythonprt:31056678 dwnewjupyter:31046869 2f103344:31071589 26j00206:31048877
Leo-Nicolle commented 4 months ago

Same here on 1.90.1 and ubuntu. It seems to be coming from the rendering process. Jut open a file, scroll up and down and check the cpu usage. Here is some description that htop gives of the heavy processes.:

 --type=gpu-process --disable-gpu-sandbox --use-angle=swiftshader

Can we enable GPU rendering somehow ? ( I found Terminal>Integrated>Gpu acceleration checkbox in the settings but it seems to be for the terminal, not for the main frame)

daler-rahimov commented 4 months ago

Same here on Ubuntu 20.04.

AndreasKleineberg commented 4 months ago

Same for me:

Version: 1.90.1
Commit: 611f9bfce64f25108829dd295f54a6894e87339d
Date: 2024-06-11T21:02:43.666Z
Electron: 29.4.0
ElectronBuildId: 9593362
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.5.0-35-generic snap
AndreasKleineberg commented 4 months ago

Downgraded vscode back to 1.90.0 and everything is working smoothly again:

Version: 1.90.0
Commit: 89de5a8d4d6205e5b11647eb6a74844ca23d2573
Date: 2024-06-04T19:43:07.605Z
Electron: 29.4.0
ElectronBuildId: 9593362
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.5.0-35-generic snap
mirc1one commented 4 months ago

Same. There was another ticket on this issue but it was overlooked.

Downgraded to 1.90.0 on macOS and it works again. Most likely a vscode issue. Removing extensions does not help.

Lakori4 commented 4 months ago

Could you point out how to revert to a previous version? I tried searching online but any of the solutions resolved my problem.

daler-rahimov commented 4 months ago

Could you point out how to revert to a previous version? I tried searching online but any of the solutions resolved my problem.

There is no way to "revert" inside VSCode itself. You will need to use whatever package manager was used to install it in the first place. E.g. for snap: sudo snap install code --channel=latest/stable --revision="160" --classic

hwrene commented 4 months ago

I tried to install version 1.90.0 revision 160 but on ubuntu 24.04 with wayland vscode closes after a few seconds open.

dukesaturn commented 4 months ago

Same here on Ubuntu 24.04. The only way I found to fix it is to revert the release using: sudo snap revert code.

dougsouza commented 4 months ago

Found this solution on reddit:

You can solve it be running with --disable-gpu flag, or you can make it permanent by adding "disable-hardware-acceleration": true to the to the runtime arguments config.

Ubuntu 24.04 LTS here

robkane1 commented 4 months ago

Same here. Not noticing any real performance issues as such yet, but every time I save a file, my machine sounds like it is about to take off and every single CPU core starts redlining. Ubuntu 24.04. i7-12650H.

Turning on/off hardware acceleration seems to make no difference.

ParanoidArsenal commented 4 months ago

Same :( Reverting the release helped

aselstyne commented 4 months ago

I tried to install version 1.90.0 revision 160 but on ubuntu 24.04 with wayland vscode closes after a few seconds open.

This issue had a workaround in 1.90.0. Instead of opening VS Code from the GUI, use the terminal with the command code --in-process-gpu. This should allow you to open it.

aselstyne commented 4 months ago

For version 1.90.1, here's the workaround that's fixed it in my case (i9-13950HX, RTX 5000 Ada Mobile GPU, Ubuntu 22.04.4 LTS).

As an extension on the workaround for version 1.90.0, you now need to open from the terminal with the following command: code --disable-gpu --in-process-gpu

Neither one of these flags solved the issue for me on their own, but when taken together it opened and the interface was much more responsive. This also greatly reduced the idle CPU usage while using Code (~20% on vanilla 1.90.1, ~0.8% on workaround version).

tougaj commented 4 months ago

Found this solution on reddit:

You can solve it be running with --disable-gpu flag, or you can make it permanent by adding "disable-hardware-acceleration": true to the to the runtime arguments config.

Ubuntu 24.04 LTS here

I just tried this tip on one of my computers. It seems to have worked: the performance has increased significantly. However, I'll have to try it on the other one tomorrow (it was impossible to work on it today because of the friezes). Thank you

strblr commented 4 months ago

Same problem here on Ubuntu

akmissawa commented 4 months ago

Same here on 1.90.1 snap version on Ubuntu. Downgrading to 1.90.0 (snap revert code) solved the issue

shelvesdragon commented 4 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 . There currently is a candidate build intended to be included in release 1.90.2 mentioned in this comment https://github.com/microsoft/vscode/issues/212494#issuecomment-2168893148 looking for feedback. Otherwise, your options for now are mentioned in this comment: https://github.com/microsoft/vscode/issues/212494#issuecomment-2168072242 Hope this helps!

deepak1556 commented 4 months ago

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