Hacker News new | ask | show | jobs
by squeaky-clean 895 days ago
Something is very wrong with your system configuration if VS Code has issues showing keystrokes in realtime. It's not a VS Code or electron problem.
8 comments

I've had this happen with VS code. When your system is under load, VS Code not only gets keystrokes in a laggy way, the characters arrive in the wrong order.

Haven't had this problem with other text editors.

Yes same experience here, it'll perform well for the first 3 keystrokes after a rest, then start lagging, compounding lag to the point where the screen is 5 characters behind of what I am typing, then I have to wait 10-15 seconds for it to rest and report all the errors. It's terrible but there's no alternative for the features.
That's entirely different than having "never" seen it handle keystrokes in a timely manner.
I've seen this too. With recent versions nonetheless.
VS code has had 1 or more frames of keystroke latency on every system I've ever used it on (across years of regular use, on multiple devices and OSes).

It's imperceptible to some. Not to me. Drives me up the wall, but the vscode integrations are too good.

People say this but then I look at them typing and I can literally see the lag compared to closer-to-the-metal toolkits.
This happens to me pretty regularly when training ML models or running heavy simulations etc, the system is taxed and electron just gets swamped meanwhile more efficient apps can handle themselves just fine on the side.
Except, maybe, for the fact that they are attempting to run anything Electron at all on their device, it is not a configuration problem to use a machine that was manufactured a couple years ago and was most likely not top-of-the-line hardware even back then.

(In my particular case I've a passively cooled laptop from like 2021; The limited compute resource available to applications in that device really made me appreciate the well built applications)

I currently use an old macbook from 2014. Everything is slow and I can't have too many applications open at once. But vscode is still one of the snappier ones and I don't see those keystrokes issues.

Of course you can always go less powerful but at one point you just can't use all more complex editors. It's not an electron issue.

Vscode struggles with intellisense and vm round trips on my older cpu. Feels like a race between displaying the character I just typed and displaying suggestions. Sometimes.
to be fair, it's possible that I also experience this from time to time. Since it's an old laptop, sometimes things are slow and I have to wait a bit for intelligence to initialise and cache results. But generally, especially if I close most other programs, it feels reasonably snappy and I don't have the displaying issue.
As an OSX user I had problems with VS Code only on 2 occasions: 1. Syntax highlighting gives up on larger files. What can be considered "large" depends on your machine of course. In this situation I use Sublime Text. 2. I worked on a web frontend that used React MUI (Material UI). That particular version of MUI & VScode combo didn't work at all. Intellisense would slow the editor down to where it was barely usable. That was a couple of years ago, never seen this issue again.
Try opening a 100 MB file in your text editor and report back.
I have the same not-a-VS-Code-or-electron problem.