vscode: Terminal is unusably slow due to GPU blacklisting
- VSCode Version: 1.26.0
- OS Version: Fedora 28
Steps to Reproduce:
- Start VSCode
- Try to use the integrated terminal - it’s very slow
My system uses an AMD RX 480 GPU with Mesa 18.0.5 as the OpenGL driver. For some reason, Electron puts me onto the GPU blacklist, which results in bad performance. It’s especially noticeable with the integrated terminal, which is unusably slow.
Starting VSCode with the --ignore-gpu-blacklist
flag fixes the performance problems, with no noticeable issues.
It is unclear if my system/GPU was on the blacklist on previous VSCode versions as well, but they did not have the severe performance issues with the terminal.
So this might be two issues, I’m not sure: First, VSCode’s terminal is extremely slow without GPU acceleration in 1.26.0, and apparently this wasn’t a problem before. Second, VSCode/Electron seems to blacklist various GPU/driver combinations for no specific reason. I’m using an up to date driver with a contemporary GPU and acceleration should work just fine.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 20
- Comments: 15 (4 by maintainers)
The GPU blacklisting problem does go away with Electron 3 (https://github.com/Microsoft/vscode/issues/52629, for the most part at least). The dom renderer was added such that we have a reasonable experience when Chromium wants to disable the GPU like this (as we don’t know why it wants to disable).
Something to note though is that there was also a pretty bad terminal perf regression in 1.26 which is fixed, I expect the experience in Insiders (tomorrow’s build) to be much better for both canvas and dom renderers. https://github.com/Microsoft/vscode/issues/56628
Let’s track the slow GPU issue due to Electron in this issue.
Is it possible to permanently set
--ignore-gpu-blacklist
in the preferences? That might be an acceptable workaround, short-term.On the 1.25.0 even using canvas mode the performance on terminal is absurdly faster. On the 1.26.0 even with --ignore-gpu-blacklist the terminal suffers from slowdowns here on my enviroment. I am rolling back to 1.25.0 temporarily. 😦
Changing to dom the rendererType solves the problem but the terminal here is getting a lot of padding issues.
I am currently working inside a virtualbox machine with no 3d acceleration (due to linux incompatibilities) and the performance is heavily noticed here.
Please fix this issue, if you need some help or some tests on my enviroment please let me know and I will be glad to contribute.
Thanks.
Hitting this issue on a Lenovo T470s (high dpi main display - 2560x1440) since last update to 1.26.* and have been getting notification about terminal renderer being slow. Switching to
dom
renderer type didn’t help. I generally run with--disable-gpu
since I get scroll issues on touchpad and I’ve tried with and without that. However, starting Code with--ignore-gpu-blacklist
has completely alleviated the terminal being slow.Since we just merged in Electron 3 to Insiders (v1.31) I’m going to call this closed. If you do still see slowness issues the first thing you should do is turn on the DOM renderer by adding this setting (you should be prompted automatically to switch if your terminal is slow):
The DOM renderer’s performance has also improved a lot in Insiders due to https://github.com/xtermjs/xterm.js/pull/1792, it’s not meant to be faster than canvas but it should be reasonable. If you see any bad performance issues with the DOM renderer please file an issue.
I’ll lock this to prevent this information from being buried.