The US presidential elections are around the corner, and while the use of social media dominated the 2008 elections, this time around we can expect mobile websites and applications to steal some of the limelight. For the purpose of this post, we’ve taken a look at President Obama’s iPhone app, which on the surface, appears flawless. But, when we took a closer look, we saw some interesting performance issues.
If you examine the waterfall above you’ll see that a few pictures were downloaded twice (I’ve highlighted duplicated pictures using similar colors, click on the image to see it in higher resolution). As a matter of fact, when you use Obama’s app and click on the “Photos & Videos” button, every picture thumbnail you see is downloaded twice from Flickr, where they are hosted. Clicking on any of the thumbnails leads the app to download the full sized picture twice. Even the videos tab shows the same behavior, and each video’s thumbnail is downloaded twice from Youtube. Although these redundant downloads don’t seem to have a noticeable performance impact, they drain your battery unnecessarily and may cost you money, depending on your mobile plan. The Obama campaign doesn’t host its pictures and videos on their own server. Were they to do that, they would pay for the excessive use of downstream bandwidth.
Moreover, this app exhibits one more peculiar behavior. Clicking on any of the thumbnails not only causes the app to download the full-scale image (twice) but also the full version of one or two other photos (obviously, it downloads those twice as well). I believe this is a clue to what went wrong – some form of predictive downloading mechanism, meant to improve performance that contains a bug and backfires. All the picture downloads go through that mechanism and an error in its implementation results in the double download, instead of just downloading content it “believes” will be requested later. It’s a wild guess, but I couldn’t think of a better one (comments are welcome!).
This shows the importance of analyzing the traffic mobile apps generate during pre-deployment and post-deployment testing – it took me less than five minutes after downloading the app to discvoer this problem with Shunra Analytics. Avoiding silly performance bugs in production? Yes we can!
note: we also tested Romney’s app, but as to the time of writing this blog post, it has minimal functionality and doesn’t utilize the network.