Co.Design

The 3 White Lies Behind Instagram's Lightning Speed

Instagram is a good example of how coding tricks are the secret sauce behind a great user experience.

You can take any user interface in the world, and whether it’s gorgeous and intuitive or ugly and clunky, there’s one unifying factor that will right pretty much any wrong: speed. Think about it. The load screen, the spinning beachball, the three-seconds of stutter before your click registers as a click--those are the worst experiences you’ve ever had with any user interface. And they’re all related to core responsiveness.

This principle has led us to build faster and faster computers and faster and faster data networks, to cut the lag time behind multitasking and enable computers to wait on users rather than users on their computers. Almost everything on a modern computer happens instantly. It’s great. But what about mobile phones? How do you give this instantaneous experience when tethered to a shoddy 3G connection?

If there’s one company who could tell you, it’d be Instagram. And what do you know, Instagram’s co-founder Mike Krieger lifted the curtain on three of their backend (and UI) tricks that give the Instagram user a feeling of responsiveness, even when someone’s phone is trapped on a lousy connection. The ideas aren’t just clever; they’re so logical that you don’t need to be a coder to appreciate them:

Instagram Always Pretends To Work
What Instagram labels as “optimistic actions” really boil down to something far simpler: Always make it look like the service is working, even when it’s not. In your Instagram feed, this idea plays out to the “like” button. Have you noticed that whenever you click it, even deep down in a subway, that like button lights up? If your connection is broken, of course you can’t upload the bits of data to a central server to inform a friend that their photo of last night’s dinner was simply divine. But registering the action gives positive feedback to the user. It’s a lie, sure, but it’s a white lie. No one gets hurt banging their heads in frustration, and the like can always be uploaded later.

Loading Content Based On Importance, Not Order
When you open Instagram, you’ll spot content downloading incessantly. Even still, how can a spotty connection build a list of all your friends’ photos instantaneously? Instagram loads content, not by chronological order, but by importance. If a lot of friends have liked something, that photo will be loaded before a more recent shot by the same person that no one cared about. A user will eventually want the option to see everything, but in a pinch, they’ll have access to the content most important to everyone they know. It keeps the social service social.

Anticipating The User’s Every Move
Now if there’s any single slap-yourself-in-the-head lesson to be learned from Instagram, it’s that there’s no reason a computer should ever be waiting for the user to hit “submit” to start the data upload process. Instagram hides data transfers in screens that most people would call stagnant. For instance, when you’re captioning a photo for upload, Instagram will already be pulling potential stores and restaurants that match your GPS location for checking in, and they’ll have been uploading the photo itself (though not sharing it) since you selected a filter. This cuts down, or even eliminates, all possible lag time on the next few screens that the user visits. Just because you need a few moments to think of a funny caption doesn’t mean that your cell phone can’t tackle a few other jobs while it waits.

It just goes to show, still waters run deep. The simpler a UI feels on the surface, the more engineers that are swimming underneath, keeping it all afloat.

[Image: CHEN WS/Shutterstock]

Add New Comment

17 Comments

  • Rob Neff

    As a knowledgeable user, I don't even bother using a picture service when I don't have a decent data connection.

    What kills me about Instagram is you take a picture in some wilderness location with no signal, drive home and want to upload with GPS.  Instagram doesn't take the coordinates from the photo, it maps the photo with the location where you are doing the upload.  It doesn't let you even let you search a location more than 15 miles away, you have to select from nearby FourSquare locations.   So frustrating!

  • Richard Holt

    Yes, but they still can't get the painstakingly framed picture you've just taken not to infuriatingly shift by several pixels for no reason whatsoever on upload can they.

  • vitalym

    "You can take any user interface in the world, and whether it’s gorgeous and intuitive or ugly and clunky, there’s one unifying factor that will right pretty much any wrong: speed." 
    - Let me get this straight, so I can have a crappy interface and as long as it works fast, it's actually going to be a good interface? Since speed will right any wrong? Wow. That's just... wow.

  • trace cohen

    i think you kind've set yourself up on the last line - the simpler it feels the more engineers swimming underneath it -  with instagram that's clearly not the case, its a perfectly small group. you might have wanted to say the simpler the UI, the fewer engineers behind it.  

  • Arminder Dahul

    I have to say I haven't experienced this on my Android phone. It seems like Instagram is only do one thing at a time. For example it takes an age to find my location, this could be anything but Instagram takes ages whereas some other apps don't. Also the upload fails so I have to retry it. 

    It would be interesting to know if this is just on iOS or this is across the board. If it isn't the same on Android, why not?

  • celsma

    My buddy has the new razor and I have an old LG droid. Mine finds location much faster than his. I think it may have been an oversight on some phones, or I'm stuck at 2.2.2, maybe newer version is the problem?

  • blueapples

    They're not really lies. The app actually makes sure to get the request done. There's a big difference between that (which is just good client-server architecture) and "lying".

  • El Burro

    breaks fundamental design principle that if I decide to press Cancel finally because of having second thoughts or the picture ist too private or plain inapropriate - I will already have uploaded it to the interwebs and handed over control of that picture or even rights on that picture.