Live data from Hacker News

Typometer: A tool to measure and analyze the visual latency of text editors

pavelfatin.com

61–70 of 104 posts

Re: Typometer: A tool to measure and analyze the visual latency of text editors

#61
post #58

Earlier quoted context omitted.

Wait, why would a CRT be faster than LCD? If anything, I'd naively expect faster response with no electron beam to move.

It's not so much that CRTs are faster than LCD. It's that old consoles (up until the Sega Saturn, Nintendo 64, Sony Playstation era) didn't draw to frame buffers. They didn't have enough RAM to have a real frame buffer. You configured the graphics chip what you wanted it to draw, and as the scanline scanned across the screen, it outputted the color that was supposed to be output depending on the background/sprite/pal…

Thank you for this.

I started on the Apple II and i'ts been downhill since then. If I remember correctly the Apple II has one of the smallest latency between touching a key and seeing the result on the screen.

Re: Typometer: A tool to measure and analyze the visual latency of text editors

#62
post #18

Earlier quoted context omitted.

If you really believe that you're sensitive enough It's pretty obvious when using extended shortcuts or a string of keys that are committed to muscle memory, like Ctrl+Shift+P (+ first letter of a cmd) or Ctrl+K combos. Imagine playing an instrument wired up to headphones and then adding a 30-60 ms delay... the longer the delay the more it creates that "off" feeling Don't forget too, those are bare metal calculations…

The ear's whole function is to detect differences in patterns. This is how we identify the direction of sound with only two ears. For our ears, a delay of 30ms is an eternity. The eyes on the other hand have very little response to this. Some will say they can spot a 15ms vs 30ms visual delay easily, but this is an open debate rather than an obvious fact. A 15ms delay in audio is noticeable to almost anyone. Differen…

Your 15/30ms is close to the timings of 30 vs a 60fps videogames. While testing for a single frame you'd probably get very mixed results, most people can distinguish the pattern of when the framerate drops from one to the other. That looks more close to me to the audio example, since it's a constant stream of visual information.

Re: Typometer: A tool to measure and analyze the visual latency of text editors

#63

Earlier quoted context omitted.

> I think the latency becomes most problematic when it's inconsistent Indeed! I don't have a problem using say a SSH console with 1 second lag. After a bit of initial cursing, it works just fine, I can write my code or edit conf files just fine. It's not as comfortable as writing at home, but it's not really a big deal. However if the lag is inconsistent, say due to packet drops, it's horrible. Even if the base laten…

It's funny you mention this, because I like to use vscode over ssh. I believe the editor updates the screen before the change is ever made on the server, so it feels nice and responsive like you're coding on your home machine.

Not trying to take merit away from VSCode, but emacs and tramp mode also do that. And not just with remote machines over ssh, docker containers work as well. Also docker containers over an ssh connection (or whatever crazy combination you may need).

You get latency-free editing because the file is edited locally and sent to the server on save. Simple implementation but highly effective.

Re: Typometer: A tool to measure and analyze the visual latency of text editors

#64

The companion article at https://pavelfatin.com/typing-with-pleasure/ has some example results, showing Atom, the only Electron-based one in the list, as having several times more latency than the others. I wonder how VSCode compares. It's unfortunate that software seems to feel slower the newer it is, including developer tools such as text editors/IDEs. I suspect this is because most people - including younger devel…

I tried vscode on win10 core i5 1st gen. Could barely reach 2 keys per second. I was honestly shocked.

Re: Typometer: A tool to measure and analyze the visual latency of text editors

#65
post #16

The companion article at https://pavelfatin.com/typing-with-pleasure/ has some example results, showing Atom, the only Electron-based one in the list, as having several times more latency than the others. I wonder how VSCode compares. It's unfortunate that software seems to feel slower the newer it is, including developer tools such as text editors/IDEs. I suspect this is because most people - including younger devel…

A few months ago I found my old GameBoy and played through part of "Kirby: Nightmare in Dreamland". I know its not the most well-known game, so the relevant detail is that it relies a lot on timing and quick movements. I was completely blown away by the responsiveness of the controls. The control feedback was instant , frames were rock-solid, and there were no loading screens at all. When I put down the game, I was j…

I think it says something about human interfaces. When I run old linux 2.4 distros, even if everything is crude (GUIs redraw without double buffering, no compositor nothing).. no font AA .. yet it feels 'better'. And it's not nostalgia only.

Re: Typometer: A tool to measure and analyze the visual latency of text editors

#66
post #18

Earlier quoted context omitted.

If you really believe that you're sensitive enough It's pretty obvious when using extended shortcuts or a string of keys that are committed to muscle memory, like Ctrl+Shift+P (+ first letter of a cmd) or Ctrl+K combos. Imagine playing an instrument wired up to headphones and then adding a 30-60 ms delay... the longer the delay the more it creates that "off" feeling Don't forget too, those are bare metal calculations…

> Imagine playing an instrument wired up to headphones and then adding a 30ms delay We need to keep these numbers in context. 30ms delay would appear as an echo if you were playing an instrument and also listening to a 30ms delayed version of the same sound. However, you're not feeling the latency . You're noticing the presence of two distinct signals. That's why UX input latency matters much more when you're doing s…

> However, when you're typing a memorized series of letters on a keyboard, you're not comparing the keypresses to the letters appearing on the screen. You already know what you're typing and what you expect to see on the screen. Visual stimulus latency is on the order of 250ms, so you wouldn't even begin to start processing types for an order of magnitude larger than the latency of these text editors, for example.

nothing makes me want to throw my computer through the window faster than typing and not having an instant response honestly. It doesn't matter that the brain cannot process the letter. Would you imagine handwriting where the shape of the letters you write is 1/4th of letter shape late ?

Even for typing, just comparing xterm at 60hz and 120hz on my monitor feels different when typing moderately fast (100 wpm according to https://typing-speed-test.aoeu.eu/?lang=en)

Re: Typometer: A tool to measure and analyze the visual latency of text editors

#67

Seeing as how this and similar articles regularly crop up here, I'm curious as to when this started and why nothing is done about it. I still regularly use my 14 MHz Amiga 1200 for recreational programming and I _never_ experience input lag on that machine. Thinking back, the first time I noticed input lag was on a Mac LCIII running Word in the mid-90s. Then for a long long time I didn't come across any particularly…

There are underlying reasons, much of which can be gathered under the umbrella term of "virtualisation". Modern computers use layers upon layers of software or hardware to present an interface pretending to each higher level that things are simpler than they really are.

These abstractions, however, are leaky, and almost all of them are leaky in the temporal sense. There's a pretend continuity or constant throughput that's not really there.

Everyone knows that operating systems run short time slices of processes on physical cores, so that each program can "pretend" that it runs continuously on bare metal. But of course, not really, so there are gaps in the flow of execution that can occasionally be perceived by end-users.

If that were the only sin of pretense, then that could be worked around, or carefully tuned, but the reality is that it's just one of many layers.

The garbage collector of managed languages (e.g.: JavaScript in Electron) pauses execution within the process too.

Even unmanaged languages have variable overheads when allocating or de-allocating from the shared heap.

The desktop window manager helps each application pretend that it has a rectangular surface from (0,0) to (w,h), when in reality that is transformed and overlaid. That can introduce a lot of variation, particularly because the DWM has its own threads and its own garbage or heap.

The video card in turn is no longer just a block of memory mapped into the address space of the program doing the drawing, but is its own little computer with cores, threads, schedulers, locks, clocks, delays, and so forth.

The display in turn might further delay things because it has complex overdrive or scaling logic, so it needs to buffer frames.

It's turtles all the way down.

Re: Typometer: A tool to measure and analyze the visual latency of text editors

#68

The companion article at https://pavelfatin.com/typing-with-pleasure/ has some example results, showing Atom, the only Electron-based one in the list, as having several times more latency than the others. I wonder how VSCode compares. It's unfortunate that software seems to feel slower the newer it is, including developer tools such as text editors/IDEs. I suspect this is because most people - including younger devel…

Isn’t it because older tools never go away ?

Newer tools only come as alternatives to faster tools that continue to be usable at any time.

For instance I choose to use VSCode and consciously weight it down with plugins and extra linters, because the trade-off is fine for me.

But I know vim is only a click away, and if I wanted sheer speed I’d do it there. And I actually do use it on a day to day basis, it’s just not my primary editor.

Re: Typometer: A tool to measure and analyze the visual latency of text editors

#69

Using Java to measure latency... Does not sound very accurate.

Why not?

Because in a garbage collected language, most of the time you have little to no control over how and when the garbage collection takes place, and how long it will take.

That's the reason you won't see a Java-based pacemaker anytime soon.

Re: Typometer: A tool to measure and analyze the visual latency of text editors

#70
post #18

Earlier quoted context omitted.

If you really believe that you're sensitive enough It's pretty obvious when using extended shortcuts or a string of keys that are committed to muscle memory, like Ctrl+Shift+P (+ first letter of a cmd) or Ctrl+K combos. Imagine playing an instrument wired up to headphones and then adding a 30-60 ms delay... the longer the delay the more it creates that "off" feeling Don't forget too, those are bare metal calculations…

> Imagine playing an instrument wired up to headphones and then adding a 30ms delay We need to keep these numbers in context. 30ms delay would appear as an echo if you were playing an instrument and also listening to a 30ms delayed version of the same sound. However, you're not feeling the latency . You're noticing the presence of two distinct signals. That's why UX input latency matters much more when you're doing s…

> However, you're not feeling the latency. You're noticing the presence of two distinct signals.

Not necessarily; it could be an electronic instrument.

I once tested a "e-piano -> midi -> PC -> headphones" chain. The latency was not really noticeable when I pressed only a single key, but actually playing was impossible. After I replaced a (software) component with something with lower latency, it was bearable. While I cannot precisely estimate the latency reduction, I would guess that it was less than 30ms.

Post reply on HN