microsoft / vscode

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

High CPU Usage Over %300 #220098

Open ignacioxyz opened 3 months ago

ignacioxyz commented 3 months ago

Type: Bug

I just installed VSCode on a brand new laptop. I have not installed any extensions or opened any code projects yet. While I was installing other tools that I need, I noticed the laptop became laggy. This was caused by VSCode using over 300% of the CPU.

Captura de pantalla 2024-07-05 a la(s) 11 01 53 a  m

VS Code version: Code 1.91.0 (Universal) (ea1445cc7016315d0f5728f8e8b12a45dc0a7286, 2024-07-01T18:54:18.541Z) OS version: Darwin arm64 23.5.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 Pro (10 x 2400)| |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, 2, 2| |Memory (System)|16.00GB (1.84GB free)| |Process Argv|--crash-reporter-id 839dded8-b689-4eb3-9c39-5bcb092b6749| |Screen Reader|no| |VM|0%|
Extensions: none
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonnoceb:30805159 asynctok:30898717 pythonregdiag2:30936856 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 jchc7451:31067544 chatpanelt:31048053 dsvsc021:30996838 0ee40948:31013168 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 dwnewjupyter:31046869 legacy_priority:31082724 ```
githubuser6000 commented 3 months ago

Same issue on Fedora. vscode is extremely laggy, input delay is over a second, completely unuseable. I tried without extensions too, same issue. It works as expected a few seconds after opening any project, but then the lag kicks in and vscode occupies around 30-80% of CPU usage as reported by htop.

githubuser6000 commented 2 months ago

image

Seems to also be that vscode is capping framerate at 60 and dropping frames all over the place, even on an 120hz monitor