Just in case you were living in a cave and don’t know what CDN is, here is how Amazon describes it:
Amazon CloudFront is a web service that gives businesses and web application developers an easy and cost effective way to distribute content with low latency and high data transfer speeds.
But before we could do any optimizations for Animatron Editor, we need some data to work with, which in our case meant we needed to collect and analyze our load times.
There are other interesting metrics available, but I needed only one: total time until full initialization of the Animatron Editor.
Once we started collecting Editor startup times, we needed to store the numbers somewhere, so we could analyze and chart it down the road. Our analytics software supports events collection, the easiest way to work the numbers. At Animatron, we use Mixpanel, which lets you process events with any parameters and run sophisticated queries against the data.
Here is the startup time-tracking code for Mixpanel:
1 2 3
After it is set up and deployed, wait a week or two for the data to be collected.
Here is screenshot from Mixpanel view of Animatron data we collected over a two months period. Here is the formula we ran: we take our event and plot parameter total, and then throw away intervals of more than 200 seconds (clearly anomalies). Then, we average the time and segment it by type of browser.
Y axis is time in seconds, X axis is date. As you see it takes on average 8 seconds to load the editor in Safari, 15 seconds in Chrome and around 18 seconds in Firefox!
When I first saw this chart, I was really surprised (actually I still am!). Why there is such a huge difference in loading time? I would expect that loading time would depend on geographical location, but not on the browser!
So far I have come up with two possible explanations:
B: Safari users connected to the Net via better networks. If you take into account that Safari is mostly on Macs, and Macs are quite expensive, then you could conclude that people who buy expensive hardware on average also use more expensive (and thus faster?) networks.
Any other explanations? Please comment below if you have an idea!