vscode: VSCode freezing frequently after medium to long usage
- VSCode Version: 1.28.0
- OS Version: Windows 10
Steps to Reproduce:
After update to 1.27.0, I started seeing some freezing under vscode, but I didn’t investigate further at the time. But after this month’s 1.28.0 update, it happened 8 times in the last 8 minutes. I collected some stats when the vscode window is hung, and it seems like the main window process is using around 50% of CPU without me even typing anything. It unfreezes for some time, but if I type for 10 seconds, it freezes again. It used to crash in 1.27.0 on freezing, but that hasn’t occurred yet in 1.28.0.
Here are some logs on running code --status:
Version: Code 1.28.0 (431ef9da3cf88a7e164f9d33bf62695e07c6c2a9, 2018-10-05T14:58:53.203Z)
OS Version: Windows_NT x64 10.0.17134
CPUs: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz (4 x 2400)
Memory (System): 7.84GB (1.01GB free)
VM: 0%
Screen Reader: no
Process Argv: .
GPU Status: 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
CPU % Mem MB PID Process
0 53 23948 code main
0 65 9652 shared-process
43 489 10304 window (ΓùÅ _xxxxxxxxxxx.js - catalyst-v2 - Visual Studio Code)
0 6 1448 electron-crash-reporter
0 164 7136 extensionHost
0 8 9008 "C:\Users\khs\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\khs\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\jsonServerMain" --node-ipc --clientProcessId=7136
0 87 10024 electron_node eslintServer.js
0 5 14308 "C:\Users\khs\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\khs\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\css-language-features\server\dist\cssServerMain" --node-ipc --clientProcessId=7136
0 15 17304 electron_node server.js
0 35 22260 electron_node server.js
0 9 22416 C:\Users\khs\.vscode\extensions\ms-vsliveshare.vsliveshare-0.3.735\dotnet_modules\vsls-agent.exe --autoexit --pipe c5c82c8296d544e0a222cb091facc52e --service https://insiders.liveshare.vsengsaas.visualstudio.com/
0 3 20344 console-window-host (Windows internal process)
3 529 24552 electron_node tsserver.js
0 8 22408 electron_node typingsInstaller.js typesMap.js
0 12 15476 watcherService
0 5 21268 console-window-host (Windows internal process)
0 5 18536 searchService
0 89 10492 gpu-process
2 86 13816 window (Process Explorer)
Workspace Stats:
| Window (ΓùÅ _xxxxxxxxxx.js - catalyst-v2 - Visual Studio Code)
| Folder (yyyyyyy): more than 22404 files
| File types: go(5411) html(3113) js(2081) png(569) css(427) h(300)
| gql(288) md(197) sc(100) feature(93)
| Conf files: makefile(17) launch.json(2) package.json(2)
| webpack.config.js(2) settings.json(1) tasks.json(1)
| jsconfig.json(1)
| Launch Configs: go chrome
Does this issue occur when all extensions are disabled?: Can’t confirm.
This issue happens erratically, but whenever it does occur, it’s mostly after prolonged usage (5 hours+). So disabling extensions is not a viable solution for me. I also have a dump file, is there a secure channel to share this info?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 5
- Comments: 17 (11 by maintainers)
I’ve been running into this issue quite a lot lately, though it only happens to me after VS code has been running for some time (eg, 2+ hours of consecutive development). As time goes on, the freezes happen more and more frequently, often getting to a point where it’s freezing on each keystroke before I restart the program (which does resolve the freezing issues).
This first profile is of code when it's running fine (to provide some sort of baseline):
This is a profile taken while it was frozen (the main thing I see is the window process is using significantly more CPU than normal):
And finally, attached is the CPU profile. It froze 3-4 times while I was taking this profile, so hopefully there is something helpful in it. CPU-20181016T182948.zip
I’ve disabled my extensions to see if removing them will help, but only time will tell.
When it gets slow please consult the Process Explorer ‘Help>Open Process Explorer’ and check whether the Extension Host process is consuming a lot of CPU. If it does, then please create a CPU profile of the Extension Host process ad described in the Performance wiki page.
I also get this notification whenever vscode comes out of the freeze:
But inspecting the processes shows that it’s actually the main window which is using CPU and not any extension or the extension host.