• Post Calendar

    January 2014
    S M T W T F S
    « Jun   Feb »
     1234
    567891011
    12131415161718
    19202122232425
    262728293031  

Speed – The 2 Second Rule

Headline: As developers our goal should be that all operations (except for things like batch imports) should return control to the user in less than 2 seconds.

Overview

This has been a rule of mine since 1999 when I first started to really get involved seriously in development (coding, not just managing) again. It was rather casual at the beginning usually phrased as “make it fast”. But in 2005 I felt that I could put a number on it… and the number was 2 seconds.

Starting with 8 Seconds

Start with your headline! Some facilitators of meetings I participated in discussed research that indicated that when you first start speaking you have a person’s undivided attention for about 8 seconds… then the listener’s mind begins to wander. That was verbal communication. I see research today that indicates that the limit for attention on web pages might also be in the 5 to 8 second range.

So you will notice that all my blog posts start with a headline. If you read the headline, you should get the overall message. (And sometimes, it’s the last text I write for the post. I’m getting better at making it the first.)

But as I would watch users of web applications I wrote, their body language told me 8 seconds was far too long.

By 2005, after years of paying attention to user’s reactions it felt like 2 seconds was the right answer.

Down to 2 Seconds

Long ago I heard a definition of interactive software – “When the program responds, you still remember what you wanted to do.” Think about video games. They keep your mind constantly engaged and you look up wondering where the time went.

I know I enjoy that sort of crispness if I have a really fast machine and I’m working on code in Visual Studio 2012. I feel like I’m very productive, which is of course what we as developers want our users to feel.

So now back to the 2 seconds… I just finished reading the book Outliers: The Story Of Success by Malcolm Gladwell. Here is a excerpt that I found quite interesting:

Take a look at the following list of numbers: 4, 8, 5, 3, 9, 7, 6. Read them out loud. Now look away and spend twenty seconds memorizing that sequence before saying them out loud again.

If you speak English, you have about a 50 percent chance of remembering that sequence perfectly. If your Chinese, though, you’re almost certain to get it right every time. Why is that? Because as human beings we store digits in a memory loop that runs for about two seconds. (emphasis mine). We most easily memorize whatever we can say or read within a two-second span. And Chinese speakers get that list of numbers – 4, 8, 5, 3, 9, 7, 6 – right almost every time because, unlike English, their language allows them to fit all those seven numbers into two seconds. That example comes from Stanislas Dehaene’s book The Number Sense. As Dahaene explains:

“Chinese number words are remarkably brief. Most of them can be uttered in less than one-quarter of a second (for instance, 4 is “si” and 7 “qi”). Their English equivalents – “four” and “seven” – are longer: pronouncing them takes about one-third of a second. The memory gap between English and Chinese apparently is entirely due to this difference in length. In languages as diverse as Welsh, Arabic, Chinese, English and Hebrew, there is a reproducible correlation between the time required to pronounce numbers in a given language and the memory span of its speakers. In this domain, the prize for efficacy goes to the Cantonese dialect of Chinese whose brevity grants residents of Hong Kong a rocketing memory span of about 10 digits.”

So as you can see there is something magical about short periods of time – specifically, 2 seconds. I know that if a web page takes too long to load, I’m likely to move on to something else.

But It Is Hard…

Yes… But that frankly is what makes software development fun in my opinion… How boring if everything was easy. You’ve all seen Google Maps, so I don’t need to describe the tricks that they play to get maps onto your screen quickly. And yes, we have a challenge they don’t – our maps and other displays change! They can easily store different levels of detail. In my past experience similar tricks needed to be played. What the right solution is will vary, but as developers we need to perform magic so that the user’s experience flows naturally – that is, get back to them in less than 2 seconds.

One Final Story – A Visual Trick

In designing an application many years ago we had problems with display performance. It was taking too long to display information on the screen. There was an internal debate. If we put swaths of information up – say 40 pixels at a time – it took 15 seconds to complete. But if we waited and displayed it all at one time, it took 10 seconds. (Times are as I best recall… I do know that the swaths were 50% slower.)

So we put it in front of the users. 100% of the users said the swaths were faster! But they weren’t. We measured it and knew it was 50% slower!

However, the user was able to start seeing information and doing some mental interpretation of it before they gained control back. Their mind was engaged. Now the web has completely ruined any such low bar at 10 seconds, but you get the idea. We need to know what the user perceives and how their minds work so we can work our magic.

Summary

Toward the end of last year I had numerous encounters with users. A message I heard – loud and clear – from 100% of those interactions can be best summarized as, “You really need to work on performance.”

Leave a Comment