Why does Visual Studio Code work slow in Ubuntu?
I have installed Ubuntu 18.04 LTS I used to use Visual Studio Code for my projects but the problem is that it is very slow. It hooks or locks, I do not know how to put it so that they understand me, because I use the translator and I do not know what will be better. The fact is that it is very bad, both in this version and in 16.04. I also have it in Windows and it works perfectly. Sometimes it crashes, blocking all processes and denying access to the computer. Does that have something to do with Ubuntu, should I optimize it in any way? If you give me some idea, well, as I said, I got used to Visual Studio and I tried Sublime text-3 which is much better, but I should get used to it and I do not like it very much. Forgive the syntax, I must use the translator. Thank you.
in the case that you still having this issue check out this:
Changing how the terminal is rendered
By default, the integrated terminal will render using multiple elements which is better tuned than the DOM for rendering interactive text that changes often. However, Electron/Chromium are slower rendering to canvas on some environment and so VS Code also provides a fallback DOM-renderer experience. VS Code will try to detect slow performance and give you the option to change via a notification.
You can also change the rendering directly by setting terminal.integrated.renderer
Type in your user or workspace settings.( On Windows/Linux - File > Preferences > Settings)
{
"terminal.integrated.rendererType": "dom"
}
Something else that might improve performance is to ignore Chromium's GPU blacklist by launching VS Code with code --ignore-gpu-blacklist.
https://code.visualstudio.com/docs/editor/integrated-terminal
It worked for me, not like a real terminal but better than nothing, I hope this helps!
special thanks to this reddit post.
my problem with vs code: bad performance
when writing text
and selecting text
in the editor. freezes about 0.5 seconds
there are several causes for this problem:
monitor refresh rate
(desktop user case) check you graphics card refresh rate. if you GPU has a max of 60hz
then configure your monitor to 60hz
.
if you have a secondary external monitor (laptop user case), then:
-
check your gpu refresh rate.
(for example you find 60hz) go to settings
make secondary monitor primary
-
disable built-in display
(laptop display) set secondary monitor to 60hz
reboot
for me, this option with refresh rate
worked like a charm. right now its not lagging anymore when typing/selectin text and im using manaro 21 xfce
. i know, why talking about manjaro on askubuntu, but i had the same problem in ubuntu 20.04 gnome
too, but at that time i wasnt stroke with a refresh rate idea.
vim emulator vs code extension
usually, vs code is handling the keypresses
by itself, but when vim extension is installed it overrides the control
. vim extension is single-threaded and not very well optimized and when you type you may have bad performance, so uninstall
vim extension.
too many extensions
try uninstalling the unimportant extensions or make a sacrifice to reduce the total number.
bad graphics driver
try using other graphics driver. use open-source
ones, try performance. use proprietary
ones, try performance.
laptop is in power saving mode
try setting your cpu to performance mode.