It is 2016, and we are in the midst of a highly contested presidential race here in the USA. Donald Trump and Hillary Clinton are drumming up support for their cause in any way they can. And everywhere they are, smartphones follow:
Trump with supporters taking photos. (Creative Commons 2.0 License)
Clinton takes a selfie with a supporter. (Creative Commons 2.0 License)
Now I am not a pollster. I don’t read tea leaves. I have no idea who will win this election in November. However, I am pretty good at examining mobile applications for performance issues. My team at AT&T has built the Application Resource Optimizer (ARO), a free tool that tests your application for data usage, battery drain and other performance issues. With this in mind, I thought it might be a fun exercise to look at how the apps of the top presidential candidates behave, and if there is room for improvement.
Both campaigns have smartphone apps, “Hillary 2016” and “America First.” So, I downloaded these two apps onto a Samsung S7 running Android 6.0.1, and I tested both apps with ARO. The results I will show are from my phone, and the only manipulation was to remove all traffic from Facebook IP addresses (neither application was connected to my Facebook – so this should just remove extraneous traffic.)
In this age of polarized elections, I wonder how many phones have both of these apps installed? My guess is the Venn Diagram looks something like this:
In my quick foray into political applications, I can say that both of these apps have similar premises. Info about the candidate, policy stances, twitter feeds – the sort of thing you might expect. I was surprised to see that both apps had a game to collect points – and the more you interact, share (and donate) – the more points you get. Also, if you look at the above screenshot of my phone, you might notice that I have already recieved Push notifications from the Hillary app (encouraging me to finish my challenges for the day). One of the unread e-mails is from the Trump side (“Dear Trump Volunteer”). So I can look forward to getting information from both campaigns on my phone going forward.
I tested both apps for 8-9 minutes, and they both use about the same amount of data (the Clinton app uses slightly more data, even though the test time was 30s shorter):
From a data usage perspective, the Trump app uses 20% less data per minute (560KB/min to 670 KB/min). I award 5 points to Trump.
But enough with the easy stuff! Let’s dig in a bit deeper. What kind of data are these apps sending?
Security: What is <candidate name> hiding?
What are the candidates hiding? In this case, I’m going to look at how much data these two apps send using HTTPS. HTTPS is a secure way of sending data between servers and the application. It makes it harder for hackers to intercept and read the traffic being sent. In this test, the MORE the application hides, the better.
The Hillary 2016 application is encrypting 99% of the data transmitted, while “America First” checks in at about 60%. So the Clinton app is hiding more than Trump.
Security is a win for Clinton (40% better at security). 5 points to Clinton.
What Kind of Files Do you See?
So, moving forward in my analysis, Trump’s “America First” app is at a bit of a disadvantage. Since “Hillary 2016” sends all of the data securely with HTTPS, I cannot see what files are being transmitted over the air. But, I can see 40% of the “America First” traffic. What traffic do I see, and can it be optimized?
One easy way for application developers to reduce data usage, and to make your application respond faster is to download images once, and then reuse them from a local cache (reading from a local storage is always faster than downloading again.)
“America First” has 556 KB of duplicate images downloaded more than once. Many of these images are from Twitter. However, this duplicate download is not Twitter’s fault. Each image has the following header (from the Twitter servers):
This means – you can store this file in your local cache for 604,800 seconds (that’s 7 days for those not fast with a calculator). There are other images from campaign servers that have an ETag (which means you have to check the ETag with the server before you can reuse the file). In either case, the directives from the server on how to reuse the stored files were not used – implying that there is no image cache being used in the app.
Some of the files are very large (sorted above by file size in bytes), and were downloaded a number of times. The 5.7 KB image highlighted was downloaded 4 times, and is seen below:
This image was downloaded 4 times in a 3 minute period.
So, while the Trump app used less data than the Clinton app, by simply caching images locally, it could be 11% MORE efficient – and use even less data. I take 1 point from Trump.
Most Creative Domain Name
Trump wins here. Many of the images used in the application (outside of Twitter) come from cdn.letsw.in.
CDN is short for “Content Delivery Network” They are used to distribute files around the world to be closer to the end-user. In this case, they are not in India (as you might assume from the .in), but is supposed to be read as “let’s win!” One Bonus point for Trump!
When looking at the traffic for letsw.in, I see 40 requests for images, and an additional 24 requests for the header (often used to see if the file actually exists). Of those 64 requests, 28 are successful, and the remaining 36 (12 file requests and all of the 24 header requests) respond with the error code 403 FORBIDDEN. In my one test of “America First,” it is forbidden from connecting to letsw.in 56% of the time. This is not good, so I will deduct 0.5 points from Trump.
Both Clinton and Trump have official campaign applications for Android and iOS. In my testing on Android, both applications fared pretty well. The Trump application was 20% more efficient in its data usage (but could be another 11% better with appropriate image caching). The Clinton application sends more data in a secure manner than Trump. All in all, the battle for the most efficient mobile application is a very close one. Final score (with my admittedly totally arbitrary scoring method): Clinton 5, Trump 4.5.