News for hackers. Stuff that matters.
Re:Measured typing latency of popular terminal emulators by smlavine on Wednesday May 03, 2023 @05:37PM (#35808126)
I use st daily. Having it open side by side with xterm (and also, by the way, typing out this comment in Firefox), I don't see how the differences mentioned in the article are relevant to the user experience. The character appears before my finger lifts from the key. Perhaps improvement /could/ be made, but I don't think it'd be worth it. There are other things to prioritize.

It is interesting to see the numbers laid out like this, though.

Re:Measured typing latency of popular terminal emulators by rightbyte on Wednesday May 03, 2023 @05:56PM (#35808315)
I wonder if your keyboard latency dominates?

In older games like CS 1.6 I believe I could feel the difference between say 10 and 40 ms ping. Maybe PS/2 keyboards were faster. I got the feeling older computers were way faster to respond ... but I might remember wrong.

Re:Measured typing latency of popular terminal emulators by scottlamb on Wednesday May 03, 2023 @06:19PM (#35808568)
> I got the feeling older computers were way faster to respond ... but I might remember wrong

I don't know the specific devices you've been using over time, but in general the measurements in the following article back up your memory: https://danluu.com/input-lag/

Re:Measured typing latency of popular terminal emulators by lasr_velocirptr on Wednesday May 03, 2023 @06:21PM (#35808594)
PS/2 Keyboards are faster than a USB keyboard with slow-speed negotiation with the host computer but for USB keyboards with high speed negotiation, they are at par[1]

[1] https://www.youtube.com/watch?v=wdgULBpRoXk&t=1766s

Re:Measured typing latency of popular terminal emulators by snvzz on Thursday May 04, 2023 @12:29AM (#35811200)
That's the theory. At "full bandwidth", with frequent polling, in theory, it should be possible to have excellent latency.

In practice, if you actually measure time from keypress to event, you'll find that modern "gaming" keyboards are actually laggy[0].

0. https://danluu.com/keyboard-latency/

Re:Measured typing latency of popular terminal emulators by Mr_Minderbinder on Thursday May 04, 2023 @07:12AM (#35813693)
That article is a joke.

>if you actually measure time from keypress to event

Nobody measures keyboard latency this way because when you do the keyboards with less key-travel (Apple Magic) end up with lower "latency"; clearly an absurd result and not at all what you are actually trying to measure. It does not line up with anyone's definition of keyboard latency.

This article has been posted in response in the other threads: https://www.rtings.com/keyboard/tests/latency

Re:Measured typing latency of popular terminal emulators by snvzz on Thursday May 04, 2023 @11:49AM (#35817346)
>Nobody measures keyboard latency this way (keypress travel)

You'll find most keyboards in your link, despite these fullrate-enabled high poll rates, actually have higher latency from keypress to event than what PS2 trivially achieved.

Which, by the way, is consistent with the findings in Danluu's article ("a joke"), showing that pressing 2 keys at once might not be as accurate, but does not completely compromise the results, relative to using a mechanical arm.

Note that Danluu documents his methodology, and even expresses that he would prefer a mechanical arm setup.

Which is why...

>That article is a joke.

Is undeservedly unkind.

Re:Measured typing latency of popular terminal emulators by mprovost on Wednesday May 03, 2023 @06:20PM (#35808581)
You remember... right. The Apple 2e blows away modern computers (in terms of latency).

https://danluu.com/input-lag/

Re:Measured typing latency of popular terminal emulators by Mr_Minderbinder on Wednesday May 03, 2023 @07:30PM (#35809254)
Pointless to compare those toy computers against cherry-picked modern desktop which is the equivalent of an old supercomputer. Indeed if you look at the numbers for the older workstations: SGI Indy, NeXTcube, Symbolics 3620 they are not that different and even worse than the newer machines. 30ms is not remarkable these days, with proper gaming keyboard, gaming monitor, config etc. you can get 5ms or less for the whole chain.
Re:Measured typing latency of popular terminal emulators by snvzz on Thursday May 04, 2023 @12:09AM (#35811081)
Unless you can produce actual measurements following the same methodology, for these mythical "non-cherrypicked" modern machines, I am going to call bullshit here.
Re:Measured typing latency of popular terminal emulators by kragen on Thursday May 04, 2023 @01:44AM (#35811639)
old supercomputers also sucked at latency too, and the modern desktop isn't cherry-picked

it's common for computers with less latency to also have less throughput; an arduino, the avr kind, can reliably respond to inputs in less than 200 nanoseconds

but these 'toy' computers are capable of running a word processor or spreadsheet, writing email, browsing the web (without js), compiling c, running an ide, etc. the zx spectrum even had a first-person 3-d shoot-em-up called elite. so i don't think it's pointless

Re:Measured typing latency of popular terminal emulators by Mr_Minderbinder on Thursday May 04, 2023 @05:10AM (#35812929)
>old supercomputers also sucked at latency too

So why would you expect it to be better if you shrunk them down to micro size? That is the whole point of my comment, that the observed latency is better explained as a function of hardware/software complexity and not "year of production". If you understand this, it should not surprise you at all that most contemporary desktops have the latency characteristics they do since we have seen it before in the old supers/workstations, their closest equivalents in terms of hw/sw complexity and capability. Of course it could be better and some are but you won't find them in that article.

>but these 'toy' computers are capable of running a word processor or spreadsheet, writing email, browsing the web (without js), compiling c, running an ide, etc. the zx spectrum even had a first-person 3-d shoot-em-up called elite. so i don't think it's pointless

Can it perform those tasks all at the same time like we expect now or like a mainframe/workstation user would have expected then? When you look at the entire landscape of computing hardware and software it is difficult not to see the early micros in that light. An extreme example would be the Altair 8800. I don't see how you could describe that computer as anything other than a plaything for enthusiasts. I made the analogy between modern desktops and old supers which you seem to agree with; could you even say that an early micro is the rough equivalent of a 50's mainframe with a straight face? It should be but the analogy is more difficult to justify: 36-bit vs 8-bit words, FORTRAN vs BASIC, FPU (some) vs no FPU, at every level of the analysis there are compromises. It should be clear that the micro represents an extremely compromised version of general computing that would be alien not only to us but to the serious computer user in the 70s/80s and yet their characteristics should be held as a benchmark for computing devices in general? Outside the context of "the home computing experience" they make for a poor comparison. Unfortunately there is great ignorance in this area due to the disproportionate focus on micros when discussing historical computing. Videos and articles on the Apple II series, awash with insufferable amounts of sentimentality, are a dime a dozen but you will be lucky to find anything on the IBM TYPE 704, a much more interesting and equally significant machine.

Re:Measured typing latency of popular terminal emulators by 0x457 on Wednesday May 03, 2023 @06:47PM (#35808855)
I think it's more about consistency. If delay is consistent, you get used to it, but if it's all over the place it's more noticeable.

I prefer to cap FPS in games for the same reason, if my PC can't deliver consistent frame rate.

Re:Measured typing latency of popular terminal emulators by snvzz on Thursday May 04, 2023 @11:59AM (#35817539)
>I prefer to cap FPS in games for the same reason, if my PC can't deliver consistent frame rate.

This jitter is minimized, although not eliminated, with technologies such as Freesync, now part of HDMI and DisplayPort specs.

This is worth consideration when selecting a screen today.

Re:Measured typing latency of popular terminal emulators by 0x457 on Thursday May 04, 2023 @12:53PM (#35818486)
I have Freesync, it doesn't it eliminates tearing without vsync, but it does nothing about consistency of framerate. What I'm saying is that I'd rather have a narrow P99, even if it's just above 60, rather than experience 50-144fps variations.
Re:Measured typing latency of popular terminal emulators by snvzz on Thursday May 04, 2023 @01:31PM (#35819126)
>but it does nothing about consistency of framerate.

It does quite a bit. e.g.:

If your refresh rate is 60Hz, that's some 16.6ms per frame.

If the frame takes 16.7ms and thus isn't ready by the deadline, you get either tearing (very visible, annoying, experience breaking) or your frame takes 33.3ms, which is a lot of Jitter.

Jitter between 16.6ms and 33.3ms or tearing, are both much worse than 16.7ms you could get with freesync, which is just some 100µs of jitter.

Even at 120Hz, the barely miss deadline case would be half the jitter, but still 8ms vs 50µs. And the tearing alternative is still every bit as horrible.

Re:Measured typing latency of popular terminal emulators by 0x457 on Thursday May 04, 2023 @03:00PM (#35820446)
Yes, it helps there, but I'm talking about frame rate constantly jumping around. I'm not talking about 16.6 vs 16.7 or even 16.9, I'm talking about 16.6 vs 40/60/90 and so on. VRR isn't going to fix it at all:

https://www.digitaltrends.com/wp-content/uploads/2022/10/got...

https://www.digitaltrends.com/wp-content/uploads/2022/10/got...

^^ I don't want this.

Yeah, the average is 60 and VRR will prevent tearing and jitter, but won't magically solve the issue I'm referring to. What I want is this:

https://www.digitaltrends.com/wp-content/uploads/2022/10/fra...

I want the same consistency for terminal input delay. Suckless terminal, for example, has higher latency, but P99 is much closer to avg than Alacritty and urxvt. While on the subject of terminals: st will stay mostly the same when there is additional load present, while all GPU-based terminals will start slipping if I'm doing something that involves GPU (discord voice call, screen sharing/recording, spotify).

Re:Measured typing latency of popular terminal emulators by snvzz on Thursday May 04, 2023 @03:48PM (#35821129)
>^^ I don't want this.

Yikes. That is bad. Maybe time to upgrade on the CPU side?

I'm using a 5800x3d and the cache sure helps with 0.1% lows.

Re:Measured typing latency of popular terminal emulators by syntheweave on Wednesday May 03, 2023 @09:54PM (#35810349)
Latency becomes more relevant the less you are able to muscle-memory your way through an input. Audio apps often need relatively short latencies(<5ms is considered professionally useful) because musicians are hearing, responding and adjusting to match time, so when they do something and the delay on output is perceptible, their timing starts to oscillate.

On the other hand, if I'm drawing on a graphics tablet, and I've trained up some muscle memory skills with blind contour exercises, I don't care that much about application latency because I'm using the tactile feedback to know what the pen is doing. I only have to look to see where the cursor starts, everything else is minor adjustment.

Keyboarding is also definitely more on the muscle-memory end of the spectrum: you look to see errors, but you can generally type a whole password without seeing it, once you've practiced.

Re:Measured typing latency of popular terminal emulators by jlarocco on Thursday May 04, 2023 @12:24AM (#35811173)
Sure, but the article isn't about audio apps or drawing with a graphics tablet; it's about typing delay in terminal emulators.

I have to agree with the OP here. I've used urxvt almost every day for years (I remember using it on a laptop with 32 MB of memory), and have never once had a problem with typing latency. I didn't even realize it was a thing people bothered to measure until I saw this article.

Re:Measured typing latency of popular terminal emulators by kragen on Thursday May 04, 2023 @01:29AM (#35811563)
there's always someone in these threads who says something like this, and to be honest https://danluu.com/keyboard-latency/#does-keyboard-latency-m... could benefit from a stronger argument that latency impedes performance or pleasure specifically for keyboard tasks rather than touchscreen or stylus tasks
Re:Measured typing latency of popular terminal emulators by _dain_ on Thursday May 04, 2023 @04:13AM (#35812619)
I can only offer anecdote and no concrete measurements. But I've used bad terminal emulators and good ones, and I can really notice the difference. When the letters appear even a few frames after they should, there's a definite (if mild) feeling of discomfort. Like some kind of sensory-motor "friction". I can still get work done, but I'm just a little less happy.

There was another HN thread recently where this topic came up, I posted about the human nervous system as a prediction-feedback system where we should expect even small latencies to have a bad effect. And someone replied with the interesting insight that 10-100ms latency feels like "you are using the tool", while <10ms latency feels like "the tool is an extension of your body". (I'd quote the whole thing but I think there's an HN rule against that.)

https://news.ycombinator.com/item?id=35055607

I'd certainly like to see an experiment where typing latency could be controlled artificially, on a high refresh rate monitor. It would test what level of latency/jitter has a perceptible effect on objective typing error rates, and subjective ratings of "satisfaction". Ask them to compare two text input fields where one has more latency than the other, see what degrees of difference are noticeable, to determine the "resolution" of time perception for fine motor tasks. I would wager that for good typists the "threshold of perceptibility" is as low as 10ms, and perhaps even lower. But that's based on my own intuition and experience; I'd love to know for sure.

Re:Measured typing latency of popular terminal emulators by alpaca128 on Thursday May 04, 2023 @06:28AM (#35813365)
> 10-100ms latency feels like "you are using the tool", while <10ms latency feels like "the tool is an extension of your body".

Seems like that's similar to how Vim can feel so smooth to use, with experienced users not even thinking about what keys to press but just what operation to do, as the inputs can be combined in intuitive ways and the entire program has very low latency to do anything. Very different from "ugh, now I again need to move my hand to the mouse to select that bit of text".

Re:Measured typing latency of popular terminal emulators by kragen on Monday May 08, 2023 @12:07AM (#35857973)
my intuition matches yours (and luu's) but that isn't the same kind of conclusive refutation as luu's generic input latency arguments https://danluu.com/input-lag/

i mean it isn't going to convince anyone who says they 'have never once had a problem with typing latency'