Hacker News
points by xmddmx 2 days ago | 0 comments
^F Latency - no hits found.

Latency is one metric by which computing has gotten noticeably worse over the years.

Daily, I encounter multiple situations in which I take some action (click a button, type text in a text field, etc.) and the response is visibly delayed - from several hundred to several thousand milliseconds.

This used to happen only on websites, but lately is also happening on apps installed on my computer. The cause? My theory is that everything is now some sort of monstrosity of React or similar web app, running inside a browser process, and possibly even that local apps are sending data round-trip up to the mothership for tracking, surveillance, synchronization, etc.

And the UX is terrible - often while this is happening, stale data is showing, or there is no visual indication a process is underway.

[–] wpm 2 days ago
I am a total diva about latency. I am impatient with computers to a fault. The slow animations in iOS. Waiting for some god-foresaken lambda function to spin up for seconds to serve me a list of fucking email addresses in the dozens. Even the few seconds of latency of a LAN screen share is enough to drive me up the wall.

Software is hard to use for me now.

[–] milesvp 2 days ago
You should talk to musicians about digital equipment. They talk about latency in terms of how far away the instrument feels. It’s wild, good musicians can describe latency on the order of low tens of ms. What’s crazy to me is how good they can get at adjusting. If 8 play a game like rock band, if I don’t adjust for video and audio latency, I just can’t play at all.

And it gets worse, since equipment gets chained. If you add more than a few ms to the wet channel, it accumulates and can be very problematic if you ever feed the wet back into the dry signal.

Source: have shipped multiple digital pedals

[–] superxpro12 2 days ago
i would intentionally drag my old crt tv to rock band sessions in college because it had zero latency compared to the lcd flatscreen in the commons area.

good times...

[–] _moof 2 days ago
Animations make me crazy. Computers used to respond at the speed of thought, and now we've deliberately slowed them down for no good reason. Just show me the thing!

I used to be able to whip through 3-4 keyboard shortcuts in a fraction of a second and the computer would keep up. This was on an 80 MHz machine, by the way. Now I have a supercomputer and I have to wait for a quarter-to-half-second zoom/pan/slide/whatever with nearly every single interaction. It's maddening.

[–] badpun 2 days ago
I disabled all animations in iOS. I don't need the distraction anyway. I hope they don't take away this function in future releases..
[–] saturn8601 2 days ago
How do you deal with it? I try to write my own versions of apps. For example, I use a scraper for movie times written in pure HTML with the most minimal of CSS and JS (1-2 functions max). It looks like 1994 but is fast and clean...however there is just so much software that I can't recreate everything so I suffer in silence.
[–] ashkankiani 2 days ago
This is exactly what I did. I'm glad I started reimplementing everything when I was younger because I might not have had the patience for the grind. But after 7 years of that, I have enough momentum that it's easier and easier. It also helps to have good architectural principles. I don't treat my hobby projects like throwaways because that's how you end up with frustration.

The end result is being completely unaffected by version changes, the trends in programming that go up and down (javascript, python, whatever, doesn't matter to me what's happening in their world).

It helps that I was also an early adopter of Rust from pre-1.0 in college around 2011, and so I've had a relatively stable implementation language. That combined with C and Luajit is my permanent stack right now, but I'm in the progress of migrating to my own programming language.

The natural terminus of the path you are suggesting is to reimplement everything. Be prepared for a long road, even with LLMs at your disposal now. An LLM can't design what you want because it can't read your mind.

[–] massysett 2 days ago
If you want stable, try Common Lisp.
[–] ashkankiani 1 day ago
I regret not getting addicted to Lisp early. At Berkeley for EECS, the normal CS61A curriculum was based on scheme, but instead we had a guest lecturer from Google who did it on Python. Sure, I got an A+ and I know Python’s internals well, but damn what a miss for me. I much prefer the functional train.

What’s the best way to get started with Common Lisp now for a very very experienced programmer?

[–] wpm 2 days ago
I also generally just suffer in silence. I'm want for time to spend vibecoding fixes too. I just try to spend as much time as I can in a terminal.
[–] skydhash 2 days ago
> I just try to spend as much time as I can in a terminal

GUI are useful, but I spent so much time trying to find the perfect ones while I could quickly draft a quick CLI script for my specific problems. These days, I focus on finding libraries and utilities that solves the core of my problem, then wire them up in a way that solves my workflow. After a while, you just find that most of your computing needs are solved.

[–] pampas 2 days ago
The worst I've seen is a revenue dashboard lazy loading a list of ~50 currencies in a dropdown filter for 5 seconds. Ridiculous. Just hard code it.
[–] bschwindHN 2 days ago
> I am a total diva about latency

You should be! CPUs these days are so goddamn fast, there is zero excuse that things don't respond instantly to user input. Sure, you can't escape the latency of the speed of light, but so much software lags and feels like shit even on things that involve no network interactions. I have to use notion at work sometimes and it feels like trudging through a lake of mud. Absolute garbage latency because the devs (and their clanker handlers) apparently don't know any better.

[–] buildsjets 2 days ago
It's a 2017 article, but according to this, the two personal computers with the lowest input latency of all time are the Apple //e (1983) and the TI-99/4a (1979)

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

[–] cowlevel 2 days ago
And the highest latency was a Symbolics Lisp machine from 1986. It's not the transistor count, it's the depth of the abstraction stack.
[–] FabHK 2 days ago
In particular it's the depth of the abstraction stack divided by transistor count. Wirth's Law: "Software is getting slower more rapidly than hardware is becoming faster."

https://en.wikipedia.org/wiki/Wirth's_law

[–] crazygringo 2 days ago
No, latency hasn't gotten worse.

It just hasn't gotten better.

Fundamentally, whenever latency gets too bad, developers fix it. But often not until then. So it always just kind of sits there at the edge of just-barely-tolerable. Which is defined by human behavior, not chip speed or similar.

I remember iTunes in the 2000's taking several seconds to respond to user actions. I remember using software like PageMaker in the 1980's that would take forever to respond. Lotus Notes in the 1990's was horrible. Running antivirus would slow your system to a crawl. Other stuff from the 2000's -- Acrobat Reader, or Outlook.

It's always been an issue with apps on the computer.

[–] publlus_enigma 2 days ago
https://danluu.com/input-lag/

Some aspects have definitely gotten worse. For example, the latency between pressing a key and a glyph appearing on the screen.

[–] crazygringo 2 days ago
I think the subject here is broader UX latency, measured in hundreds of milliseconds to multiple seconds.

I've been using computers for over 40 years now, and I've never been impacted by the latency between keypress and letter rendering in my life except for on e-ink. That's not something I see anybody complaining about.

[–] publlus_enigma 2 days ago
I get it regularly today, especially in applications like Teams. I can type sufficiently quickly that it isn't uncommon for characters to buffer, and for the cumulative effect of the latency ti be that my sentence finishes displaying 2-3 seconds after I finish typing it.
[–] crazygringo 1 day ago
Fair enough! I'm lucky enough not to use Teams, I've heard the horror stories but I had no idea it was that bad.
[–] hulitu 19 hours ago
> No, latency hasn't gotten worse.

Just compare the start of Notepad in Win9x with the start of Notepad in Win11

[–] radicalbyte 2 days ago
iTunes.

Skype.

Windows File Manager.

It has been a thing for a long time in consumers software from the big guys. The people working on it don't care about UX or performance.

Now a lot of the small-company software we used to use has been replaced by slow bloated and buggy apps usually running on Electron (Slack et al) so we're seeing it everywhere as opposed to in a couple of bad apps.

[–] kalaksi 2 days ago
As it happens, today I stopped in awe about the slowness of right-clicking Windows 11 desktop on my work laptop. It consistently took over ~500ms to open the menu. I think one can get used to the slow response times after a while, but I probably won't since I only use Windows for work.
[–] layer8 2 days ago
[–] kalaksi 2 days ago
I'm assuming new is the default, so that.
[–] AgentME 2 days ago
I believe that's usually caused by a lot of random software deciding to hook the Windows Explorer right-click menu so it can decide whether to add menu items to it, possibly doing slow file IO and running serially with every other hook. (I blame Windows for allowing this and not making it more apparent to users what software is slowing it down.)
[–] etbebl 2 days ago
In theory though the new context menu should fix that since it hides shell extension options behind another submenu. Whether it's actually well optimized, I don't know
[–] Trlog 2 days ago
Software has been hooking into the right-click menu since the 90s. This isn't a sufficient explanation.
[–] publlus_enigma 2 days ago
The slow context menu has been an issue for me even on fresh installs of W11. YMMV.
[–] demibabs 2 days ago
I think it has more to do with phoning home than web frameworks. It’s not like React is that slow.
[–] thereisnospork 2 days ago
I can literally out-type my modestly powerful computer when trying to run 'calc.exe' on Windows 11, to compute 5 * 9. That's beyond absurd, and not a phoning home problem (or well it better not be).
[–] ted_bunny 2 days ago
Don't worry, those analytics are gonna make the new AI enhanced calculator really amazing
[–] cnqso 2 days ago
Just opened a fresh VSCode on an M4 Pro and it took ~10 seconds to first paint
[–] evantbyrne 2 days ago
That's probably due to factors beyond stock VSCode. Disabling extensions may reveal the culprit. They are just arbitrary JS so they can have all kinds of issues. For example, I recently tried out the biome extension but uninstalled it because I saw it was leaking gigabytes of memory.
[–] lyricaljoke 2 days ago
I think somewhere along the line, software developers have stopped learning about the principle of blocking / non-blocking operations and "not blocking the UI thread". Or, at least, enough people who don't know about this principle are submitting code that ends up in OSes and applications that we are now all suffering for it.

It really feels like the types of software which have inexplicable pauses / hiccups has grown. Sometimes even my OS (a Debian flavor, although it's a corporate managed distribution that might be to blame) locks up from time to time when I'm tethering on my phone with limited bandwidth, which is highly suspicious.

[–] arjie 2 days ago
Haha this is true but I have rewritten many things now. I use so much of a custom software stack. You can go down to primitives you like.

Most of the software I use is custom now but not in like a deep way. E.g. it turns out that browser engines are blazing fast. So what’s slow? The chrome around it, the extensions. These things I just rewrite.

It turns out that MacOS GUI primitives are also really fast. It’s just that most software poorly uses it. I rewrote text viewer applications, and a terminal emulator chrome that uses libghostty. I don’t claim originality or skill. I only claim annoyance.

Now that I’ve reached the point where the thing in the way is my OS which I have trouble modifying I suddenly understand why Omarchy is compelling to so many people. And I get why DHH is so excited about it.

You can have a bespoke system on a fast, reliable base. Why wouldn’t you do it? Why suffer?

[–] chowells 2 days ago
There are limits. USB keyboards are just always going to be slower than PS/2 keyboards. You can close the gap, but USB is just fundamentally adding wrapping layers that introduce latency over the direct polling PS/2 used. And there's a lot of this at the hardware level, where standardized connections with complex protocols replace weird custom connectors. USB is most definitely easier to plug something in to than PS/2 ports, where you had different ports for mouse and keyboard and they weren't interchangeable. (Ok, some very late motherboards supported using either in a single port, but it wasn't the way most PCs worked.)

You can do a lot at the high levels, but everything needs to be reworked from the hardware level up to match the latency of older systems.

[–] kbolino 2 days ago
> USB is just fundamentally adding wrapping layers that introduce latency over the direct polling PS/2 used

PS/2 did not use polling, it was entirely event-driven. On keypress, the keyboard sent a serial message to the 8042 controller [1], which then raised the appropriate interrupt line on the CPU, which caused the keyboard ISR [2] to be executed. The serial clock was a bit flexible, but usually sat around 10-16 kHz [3], and so the 11-bit serial message took at most 1 ms to send.

It is USB that uses polling. The keyboard describes itself using endpoint descriptors, and after obtaining these, the host controller periodically polls it with an IN token, to which the keyboard responds with its state changes since the last poll [4]. The earliest USB keyboards preferred fairly slow polling rates, but modern keyboards can be polled every 1 ms [5]. If directly connected to a motherboard USB port, a modern USB keyboard will have pre-software input latency on par with a PS/2 keyboard.

[1]: https://wiki.osdev.org/I8042_PS/2_Controller

[2]: https://wiki.osdev.org/Interrupt_Service_Routines

[3]: https://retrocomputing.stackexchange.com/q/15607/25565

[4]: https://threeboard.dev/documentation/threeboard/how_usb_keyb...

[5]: https://www.usb.org/sites/default/files/hid1_11.pdf pp. 68-69

[–] chowells 2 days ago
Agh. Crossed wires with PS2 as in the playstation 2. Its controllers used polling. I did this to myself...
[–] kbolino 2 days ago
Yeah, I'd say the bigger point is that the latency gap isn't really there anymore. Old keyboards, cheap keyboards, expansion ports, and external hubs can still cause problems, though.
[–] jiehong 2 days ago
You just made me realise that latency might be a strong reason why some users might enjoy TUIs more.

I’m also thinking that there might be a universal solution to all animations: user-driven animation end. Like, the system could cut off the animation as soon as the user hits another key, making it faster and learning the right rate of animations over time. That would be great!

[–] publlus_enigma 2 days ago
It is absolutely one of the reasons I have moved to TUIs. That, combined with better implementation of keyboard shortcuts, makes TUI software feel considerably faster to me compared to many modern GUI apps.

Although I fired up Solaris 9 on an old Sun Blade a few months ago, and the GUI latency on that was imperceptible.

[–] CableNinja 2 days ago
Im usually ok with some slowness, i unfortunately accept that we live in a bloated world now. But, wow there are some things now that its just awful, i want to find some of these devs and ask them how did they even let it get so bad.

home depots site is seriously one of the worst. Mobile phone that is from this year, on good wifi, and it takes many seconds to load any page, HOW!?!?

[–] sznio 2 days ago
i recently grabbed a PC from 2007, installed XP on it and a CRT monitor.

never have i felt a computer react so quickly. CRTs have much less lag than LCDs.

[–] cowlevel 2 days ago
Startup idea: ultra low latency LCDs.

You probably can't avoid the time it takes for the pixel to physically change (~1 frame) but you can avoid all intermediate framebuffers by careful timing synchronization. E.g. when scaling, don't buffer a frame at a time, just a line.

[–] saturn8601 2 days ago
Isn't this just what high refresh screens are? They sell like 165Hz screens with G-Sync or Freesync.
[–] cowlevel 2 days ago
Even lower latency than a 165Hz screen with a full framebuffer is a 165Hz screen without a full framebuffer.
[–] tikhonj 2 days ago
There are lots of "gaming" monitors that advertise on high refresh rates and low latency. We're talking like 4–5ms input latency and pixel response times <2ms.

Point being, outside competitive games, I do not expect monitor hardware to be anywhere near the bottleneck for latency and response times.

[–] bob1029 2 days ago
You can blame reckless pursuit of multithreading for a lot of this. Most UIs should operate using only one thread. Communication between threads is unbelievably expensive if you don't actually need to do it. The multithreading thing turned into multiple computers and containers. It's all an extension of the same madness.

Until you can demonstrate to me that you can build an async/await server that uses a single core without deadlocking, I am not so sure you should be trusted with any additional resources.

[–] TimTheTinker 2 days ago
> Most UIs should operate using only one thread

on the contrary, native app UIs should at minimum separate the UI thread from background work, if only to keep UI controls responsive.

The UI thread may spend most of its time asleep, but it has to be available to instantly respond to user input (or events/signals from the OS)

[–] domador 2 days ago
Really? I thought the opposite was the case, that UIs don't use threads enough. For instance, the WhatsApp Windows desktop app often freezes while I'm trying to type a message, often losing much of what I type. It's not the only program that does. The part of the program that takes in keyboard input should never freeze because some other part of the program needs to load data somewhere else.

Maybe we're talking about different things, though.

[–] mock-possum 2 days ago
Spotify on iOS has been actually literally unusable more often than not for me lately.