When every millisecond counts.
I am at the beach. I put my head underwater, and watch as a cobble falls through the water and hits another cobble. It sounds weird to me, but I can't figure out why. Too loud? Wait, no, it's too immediate! I've got so used to the speed-of-sound delay that when it's not there it feels notably different.
I am playing Patapon, a rhythm game for the PSP. The introduction advises players to play with head-phones rather than using the device's speakers, so as to minimise the delay between when the sound is emitted and when they get to hear it.
I am playing Super Meat Boy, a highly acrobatic platform game. While I could play it on my laptop's keyboard, my mechanical one is wholly unsuited to the task, as the time it takes to press each key is too large.
I am asking people about their experience using carbon-fibre practice swords, rather than the traditional bamboo. Most highly dislike them, describing them as “too plasticky”. Some use them for everyday practice, but use bamboo for competitions. When I eventually wield a nylon practice long-sword, the feeling of “too plasticky” becomes clear as day: as the sword is slightly floppy to cushion its strikes, there's a small delay between when the handle moves and when the sword's tip follows, which feels unpleasant to the hand.
I am watching a YouTube video, while wearing my Bluetooth head-phones. At some point the speaker's mouth and speech starts to seem desynchronised, as Bluetooth sometimes has a slight latency drift that wires never do.
I am watching a video of an experiment, where two musicians are tasked with playing their instruments in unison, while the distance between them is slowly increased. At twenty metres, they're no longer capable of doing so; the time needed for their respective sounds to reach each other is too great.
I am at an army camp, watching some of my fellow soldiers march in unison. Their steps appear completely out of sync with the music that's playing. I eventually realise that the yard is so large that the rhythm they're hearing is completely out of sync with the one I'm hearing.
I am reading an article about a program developed to help Emergency Medical Technicians (“EMTs”) with paperwork. They usually snub it, and use pen and paper instead, risking valuable seconds in the process. When asked why, they answer that it's because the program's latency is too high.
I am searching the web for examples of big companies optimising for latency. In this and this article, I find the following:
- Amazon found that every 100ms of latency cost them 1% in sales.
- A broker could lose $4 million in revenues per millisecond if their electronic trading platform is 5 milliseconds behind the competition.
- In 2006, Google found an extra .5 seconds in search page generation time dropped traffic by 20%.
- As for their maps, reducing the size of the page from 100KB to 80KB made their traffic shoot up by 10% in the first week and then 25% in the following three weeks.
The value of values
By far my favourite kind of technical writing is the one that concerns values. What's important for you might not be as important for me, or even important at all. Therefore, the first thing to establish is what one does and does not prioritise. My favourite talks on the matter are, first of all the one by Scott Myers, secondly the one by Steve Klabnik, and thirdly the one by Bryan Cantrill (which also has a transcript).
In the present article, I want to establish latency as one value that nobody has the luxury of ignoring. As the above examples hopefully clarified, humans are strikingly sensitive to even small changes in latency, to the point where a latency of 2ms can be noticeable –as in the case of Patapon– and a latency of 60ms can be insufferable—as in the case of the musicians.
Spare a thought about your latency. Your users will thank you.