You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The subtle typing lag is observed in VS Code in same machine in which the typing is lag free with sublime text and even eclipse. This feature request is to look into the issue and address it if feasible.
Reacted by Alexandru Dima, Craig Smitham, Horace He, Damian Pereira, Amrit Kahlon, NightFox, Mauro, Ian Channing, Melissa, Leander Kurscheidt and 276 more
Reacted by Árni Dagur, cyh, Andrew Schreiber, James Onnen, Michal Černý, Juan Campa, HebaruSan, andrija-tosic, Chris Ha, ljubadr and 2 more
Reacted by Árni Dagur, cyh, Andrew Schreiber, Brian Ernst, Juan Campa, andrija-tosic, Wojciech Pawlik, Chris Ha, ljubadr, Justin Hubert and 2 more
Edit: this is on a Linux system with xmonad window manager.
Edit edit: If you get typometer timing out with "cannot detect char" at some point. Then, to fix, zoom in a lot. Also, you need at least one other line which is wider than the screen to make it work. Also, it's recommended to use a non-block cursor but I didn't see any difference there.
Yesterday I tried switching from Sublime to VSCode, but sadly am returning to Sublime again today because of this issue. Would love to see this fixed in VSCode.
Reacted by HMage, Vitor "Pliavi" Silvério, geekonloose, Nathan, TheTastefulToastie, Virgiel, Dmitry Dubina, sickbailey, Humaid Alqasimi, Juan Campa and 5 more
In the case of the emacs extension, the old one had some code that was registering the "type" command to implement some more complex keybinding systems.
Not only am I experiencing input lag, but lately I also have to press the cut/copy/paste keys rather long, otherwise nothing is copied to the clipboard. Not sure if this is related, but it is extremely annoying. Although of course every good programmer never copy/pastes ;-)
Reacted by Ben Miller, Hendy Irawan, HMage, Raymond Gauthier, Matt Fletcher and Evgeny Zislis
Not only am I experiencing input lag, but lately I also have to press the cut/copy/paste keys rather long, otherwise nothing is copied to the clipboard. Not sure if this is related, but it is extremely annoying. Although of course every good programmer never copy/pastes ;-)
I'm experiencing this exact same issue. For instance, I have to explicitly hold down the command key on my mac, and then press C afterwards in order to copy. If I do it too fast, nothing gets copied. In some cases, the C key is registered before the command key and the VSCode will end up typing the letter C into the editor. I don't see this behavior anywhere else other than VSCode :(
For someone with >100 wpm, the input latency is unbearable and no amount of features can compensate for this. It is a text editor after all.
If the behemoth of IntelliJ IDEA could do zero latency, so can VSCode. Its great to see work done on the performance front, and hope this is just the beginning. 👍
Reacted by Amrit Kahlon, James Yu, Will, Peter Kneale, Alberto Silva, Denis, Michael Baczynski, Linus Karsai, Seth Livingston, HMage and 25 more
Reacted by Hugh, Smit, Esteban Garcia and Juan Campa
I'm experiencing typing lag on a Dell XPS 9350 running Windows 10 1709 (Fall Creators Update). It doesn't seem apparent in other applications, like Firefox and Chrome, but is quite noticeable in Visual Studio Code. I've noticed the typing lag while editing a JavaScript file in particular.
I see you said Sublime font rendering was great above, do you know why at the pixel level? How does it compare with VS Code's terminal rendering?
Sublime allows you to use the older GDI which in my opinion provides better looking (not as fuzzy but hinted enough) font rendering. That also depends on the font too. If you are on a < 140ppi display, and have 20/20 fuzziness would not be as visible of course. But sublime and VS code open side by side, on the same font, at the same size, you could still tell which one looks sharper.
// Windows-only options:
"directwrite": (default) Use DirectWrite for font rendering
"gdi": Use GDI for font rendering
"dwrite_cleartype_classic": Only applicable to "directwrite" mode, should render fonts similar to traditional GDI
"dwrite_cleartype_natural": Only applicable to "directwrite" mode, should render fonts similar to ClearType "natural quality" GDI
"subpixel_antialias": Force ClearType antialiasing when disabled at system level
Well there's nothing really that can improve that provided we've done a good job with either VS Code's remote connection in a remote Window. There will always be some overhead in communicating with some other machine.
True, but I was referring to the OS latency in general when WSL is enabled. Perhap things are different now as I haven't been on a windows desktop lately. If you have the time, I suggest you try your measurements on a desktop that never had WSL enabled and see how the keyboard responds. Please also see my comment about the CPU power saving settings in the bios.
In addition to disabling the CPU power saving from the BIOS, you could also experiment with disabling the USB suspend settings. I am not sure if it is possible to do on windows, but on Linux adding "usbcore.autosuspend=-1 pcie_aspm=off" made a difference. You could probably do it through udev as well.
I am on the laptop now which is 212 ppi so the camera doesn't capture the pixels as clearly, but I will take pictures of the Hack Mono when I get back to the cave. What size did you set the Hack Mono font and please let me know your screen resolution as well? I can take pictures on 1440p "23.6 and, 1080p 15.6".
Hello, It appears on Linux, vscode (electron) and sublime follow the same fontconfig (since there is no gdi, direct_write), I am not able to provide the screenshots at the moment.
Hello, It appears on Linux, vscode (electron) and sublime follow the same fontconfig (since there is no gdi, direct_write), I am not able to provide the screenshots at the moment. They both look the same way on Linux as it is configured.
True, but I was referring to the OS latency in general when WSL is enabled.
That would be surprising, perhaps it's a side effect of early WSL1 as it was more integrated into Windows? WSL2 is essentially a lightweight Hyper-V VM as I understand it.
you could also experiment with disabling the USB suspend settings.
Isn't USB suspend just a power savings thing that only has impact if you're away from your computer for a while?
What size did you set the Hack Mono font and please let me know your screen resolution
Can't remember exactly, I think it may have been ~14px on VS Code and the default in Sublime, not sure which monitor I took those on 😅
That would be surprising, perhaps it's a side effect of early WSL1 as it was more integrated into Windows? WSL2 is essentially a lightweight Hyper-V VM as I understand it.
I was on windows 10 with WSL2. Perhaps it was just a side effect of enabling the hyper-v services, perhaps it was specific to my AMD configuration. Who knows :)
Isn't USB suspend just a power savings thing that only has impact if you're away from your computer for a while?
It sure is, and should not interfere but there are quite a few posts on the forums about it too. For some people lag becomes more noticeable after a sleep-wakeup cycle. In addition to these factors, there is also the matter of the USB port you use. Some USB ports are shared across different devices, and when you have a highly active wifi connection for instance, things would start to lag as well.
Good luck and looking forward to testing the new and improved vs code.
This is now, as far as I am concerned, fixed. I just tested VSCode Nightly with "Is it Snappy?" I'm running a late 2013 Mac Pro with a 240Hz display. VSCode (32.9ms from key press to display) compares favorably with MacVim (37.5ms).
I just want to express my gratitude to Daniel Imms (@Tyriar) for their work on this. I am sensitive to latency, and for this reason I have had to simply observe from afar my colleagues usage of VSCode and some of it's fantastic features. Now I get to join in on the fun. Thank you so much for giving me access to this tool.
Reacted by Daniel Imms, Maximilian Roos, Mo, Jens Hausdorf, Andrii Oriekhov, byehack and Raphael
David Mohs (@dmohs) good to hear it's improved! Still, this should be an ongoing effort. 32.9ms is still pretty bad imo 🙁, I don't blame you for being sensitive if it was even higher than that.
Reacted by Michael Swan, Chatchai Saratakij and Andrii Oriekhov
Reacted by Vitaly, Jens Hausdorf and Andrii Oriekhov
Here is another update. I am still on Arch and a few weeks ago, I discovered something else. In my setup, in addition to the c-states, disabling virtualization extensions also reduced the input lag and standard deviation on Linux. The new intel processors have dynamic cpu scaling, so disabling performance saver from the bios may not have much effect. I would suggest disabling the dynamic scaling, and switching to usermode and set a fixed frequency.
# enable userspace power governow
# sudo sh -c "echo passive > /sys/devices/system/cpu/intel_pstate/status"
# set freq
sudo sh -c "cpupower frequency-set --governor userspace"
sudo sh -c "cpupower frequency-set --freq 2.4GHz"
We'll be starting the effort to build a webgpu-based renderer in the editor this iteration. You can read about the prototype and follow along in #221145
Reacted by basaran, Alexey Palazhchenko, Tomáš Král, Seth Livingston, Jianglong Ye, fwcd, Andrii Oriekhov, Artur Gawlik, Madao, Sander in 't Hout and 8 more
While they dont add the feature, which in imo should be even more prioritized than the GPU based renderer. I dont suppose it should require GPU to have it.
Activity
Chillee commentedon Jun 23, 2017
I performed the tests listed at "Typing with pleasure" on my own computer, and these are my results:
mauro3 commentedon Aug 9, 2017
I just ran some typometer tests as well, here the results (note the SD column is the standard deviation):

Here some interesting plots, comparing VSCode behavior of synchronous setup (a new key is only pressed once the last is displayed):

and asynchronous

Also note that some extensions can increase typing latency considerably: SebastianZaha/vscode-emacs-friendly#20
Edit: this is on a Linux system with xmonad window manager.
Edit edit: If you get typometer timing out with "cannot detect char" at some point. Then, to fix, zoom in a lot. Also, you need at least one other line which is wider than the screen to make it work. Also, it's recommended to use a non-block cursor but I didn't see any difference there.
codecat commentedon Aug 10, 2017
Yesterday I tried switching from Sublime to VSCode, but sadly am returning to Sublime again today because of this issue. Would love to see this fixed in VSCode.
amritk commentedon Aug 10, 2017
Melissa (@codecat) I was in the same boat as you, but VScode has so much else going for it I switched back again from sublime even with the lag.
SebastianZaha commentedon Aug 11, 2017
In the case of the emacs extension, the old one had some code that was registering the "type" command to implement some more complex keybinding systems.
I have removed it and I think the latency overhead is fixed. (in v0.8.0 of https://marketplace.visualstudio.com/items?itemName=lfs.vscode-emacs-friendly)
The typing latency is quite spiky though, even with no extensions, at least when trying to graph it with the aforementioned program.
codecat commentedon Aug 11, 2017
Yes, I notice the input lag without any extensions installed.
ziriax commentedon Sep 8, 2017
Not only am I experiencing input lag, but lately I also have to press the cut/copy/paste keys rather long, otherwise nothing is copied to the clipboard. Not sure if this is related, but it is extremely annoying. Although of course every good programmer never copy/pastes ;-)
richardgirges commentedon Nov 28, 2017
I'm experiencing this exact same issue. For instance, I have to explicitly hold down the
commandkey on my mac, and then pressCafterwards in order to copy. If I do it too fast, nothing gets copied. In some cases, theCkey is registered before thecommandkey and the VSCode will end up typing the letterCinto the editor. I don't see this behavior anywhere else other than VSCode :(chmln commentedon Dec 22, 2017
For someone with >100 wpm, the input latency is unbearable and no amount of features can compensate for this. It is a text editor after all.
If the behemoth of IntelliJ IDEA could do zero latency, so can VSCode. Its great to see work done on the performance front, and hope this is just the beginning. 👍
pcgeek86 commentedon Dec 31, 2017
I'm experiencing typing lag on a Dell XPS 9350 running Windows 10 1709 (Fall Creators Update). It doesn't seem apparent in other applications, like Firefox and Chrome, but is quite noticeable in Visual Studio Code. I've noticed the typing lag while editing a JavaScript file in particular.
46 remaining items
basaran commentedon Oct 21, 2022
Hello,
Sublime allows you to use the older GDI which in my opinion provides better looking (not as fuzzy but hinted enough) font rendering. That also depends on the font too. If you are on a < 140ppi display, and have 20/20 fuzziness would not be as visible of course. But sublime and VS code open side by side, on the same font, at the same size, you could still tell which one looks sharper.
True, but I was referring to the OS latency in general when WSL is enabled. Perhap things are different now as I haven't been on a windows desktop lately. If you have the time, I suggest you try your measurements on a desktop that never had WSL enabled and see how the keyboard responds. Please also see my comment about the CPU power saving settings in the bios.
In addition to disabling the CPU power saving from the BIOS, you could also experiment with disabling the USB suspend settings. I am not sure if it is possible to do on windows, but on Linux adding "usbcore.autosuspend=-1 pcie_aspm=off" made a difference. You could probably do it through udev as well.
I am on the laptop now which is 212 ppi so the camera doesn't capture the pixels as clearly, but I will take pictures of the Hack Mono when I get back to the cave. What size did you set the Hack Mono font and please let me know your screen resolution as well? I can take pictures on 1440p "23.6 and, 1080p 15.6".
basaran commentedon Oct 21, 2022
Hello, It appears on Linux, vscode (electron) and sublime follow the same fontconfig (since there is no gdi, direct_write), I am not able to provide the screenshots at the moment.
basaran commentedon Oct 21, 2022
Hello, It appears on Linux, vscode (electron) and sublime follow the same fontconfig (since there is no gdi, direct_write), I am not able to provide the screenshots at the moment. They both look the same way on Linux as it is configured.
Tyriar commentedon Oct 24, 2022
basaran thanks for the info, this is helpful!
That would be surprising, perhaps it's a side effect of early WSL1 as it was more integrated into Windows? WSL2 is essentially a lightweight Hyper-V VM as I understand it.
Isn't USB suspend just a power savings thing that only has impact if you're away from your computer for a while?
Can't remember exactly, I think it may have been ~14px on VS Code and the default in Sublime, not sure which monitor I took those on 😅
basaran commentedon Oct 24, 2022
I was on windows 10 with WSL2. Perhaps it was just a side effect of enabling the hyper-v services, perhaps it was specific to my AMD configuration. Who knows :)
It sure is, and should not interfere but there are quite a few posts on the forums about it too. For some people lag becomes more noticeable after a sleep-wakeup cycle. In addition to these factors, there is also the matter of the USB port you use. Some USB ports are shared across different devices, and when you have a highly active wifi connection for instance, things would start to lag as well.
Good luck and looking forward to testing the new and improved vs code.
Balfa commentedon Nov 24, 2022
anil (@aniljava) now that #161622 is merged, you might consider testing and closing this issue if it meets your intent.
dmohs commentedon Jan 4, 2023
This is now, as far as I am concerned, fixed. I just tested VSCode Nightly with "Is it Snappy?" I'm running a late 2013 Mac Pro with a 240Hz display. VSCode (32.9ms from key press to display) compares favorably with MacVim (37.5ms).
I just want to express my gratitude to Daniel Imms (@Tyriar) for their work on this. I am sensitive to latency, and for this reason I have had to simply observe from afar my colleagues usage of VSCode and some of it's fantastic features. Now I get to join in on the fun. Thank you so much for giving me access to this tool.
Tyriar commentedon Jan 4, 2023
David Mohs (@dmohs) good to hear it's improved! Still, this should be an ongoing effort. 32.9ms is still pretty bad imo 🙁, I don't blame you for being sensitive if it was even higher than that.
avdhoot commentedon Aug 18, 2023
David Mohs (@dmohs) Does not look like #107016 (comment)
basaran commentedon Aug 19, 2023
Here is another update. I am still on Arch and a few weeks ago, I discovered something else. In my setup, in addition to the c-states, disabling virtualization extensions also reduced the input lag and standard deviation on Linux. The new intel processors have dynamic cpu scaling, so disabling performance saver from the bios may not have much effect. I would suggest disabling the dynamic scaling, and switching to usermode and set a fixed frequency.
Tyriar commentedon Jul 8, 2024
We'll be starting the effort to build a webgpu-based renderer in the editor this iteration. You can read about the prototype and follow along in #221145
spajus commentedon Mar 8, 2026
Any updates on this? It got progressively worse with all the copilot enhancements and updates.
reinux commentedon Mar 8, 2026
Yes, even with the features turned off.
dougg0k commentedon Mar 8, 2026
While they dont add the feature, which in imo should be even more prioritized than the GPU based renderer. I dont suppose it should require GPU to have it.
This may help. https://gist.github.com/dougg0k/2c50ef89aec97f779135dc0f7f2c1c9f