Try out my new app: MealPlan, a simple weekly meal planning tool for the iPad.

User Interface Latency

One thing that's hard to measure in an application, and that's hard to quantify, is latency. Not latency when it comes to network packets or access to your database or disk, but the latency that the user experiences through your application's or operating system's user interface.

I've been finding much of the newer Microsoft software quite frustrating lately, and I've been trying to figure out why, and I think this is it.

For example, double-click on any Windows Forms application, and notice there's a delay before the application starts. I understand that the delay is because there's a huge amount of stuff going on behind the scenes setting up the VM and just-in-time compiling my code, but the end result is that to the user, the application is taking a long time to start. Users get antsy, they double-click again (which just makes things worse), and they get frustrated. Java is the same (actually it used to be much worse, but it has improved), and I think it's one of the reasons that Java never took off as an end user application development platform.

This particular ailment seems to be mostly a Windows problem. For example, do this on your system right now: Press Windows-R. This brings up the Run dialog where you can type in a command to start - and sometimes, depending on system load and how much memory you have and whatever else, it can take a few seconds to come up. Same with Ctrl-Alt-ESC and the Task Manager.

Windows Media Player is bad for this as well. Drop a file onto the media player, and it can take a few seconds while it "connects" (to my local system?) and does whatever it's doing to prepare to start playing.

Other examples of latency in Windows:

* Click the drives combo at the top of a File dialog... it can take a long time to populate that.
* Right-click on an icon in the Explorer. Building the context menu for the type of icon you clicked on can take a while.
* Click Start, All Programs. On my system, the first time I do this, it's about a 3 second wait.

These delays often only happen the first time you do something, and I think the developers put a lot of work into caching so that the 2nd time it doesn't take so long, but that's not the solution. After the first time, my opinion of your software is that it's slow.

This phenomenon apparently doesn't exist on Linux. Why is this? You double-click on a movie or music file and *bam* it's playing. It really feels instant. Right click, there's your menu (with icons on it). Etc.

Latency = Frustration

So what's the solution? Well I don't have an entire solution ready, but here's one suggestion:

  • Don't rely on caching to solve your performance problems. If something takes 3 seconds the first time, don't work on improving the performance the second time - work on improving the experience the first time. For example, I would prefer is that the All Programs menu displayed instantly without icons, and then the icons were displayed as they were loaded.

Caching leads to lazy programming - if you can show that it's really fast the second time, it doesn't matter how long it took the first time. Don't fall into that trap.

Unfortunately I expect that with Longhorn as we move into slicker UI experiences, we'll do more of the "render absolutely everything offscreen and then display it when that's done" that's responsible for some of the latency.

Leave a Reply