Our mandate: dramatically improve site performance on Gawker Media sites (Gawker, Jezebel, Deadspin...). Try to deliver readable pages to most users within 1 second.
At Gawker, we recently started to focus more intensively on web performance. We're working on improvements in a number of areas, and I wanted to show some of the process for how we identify the issues to improve on.A great way to begin any web performance effort is by analyzing waterfall charts. (Webpagetest.org is one fantastic free tool for viewing these)
Let's take a look at one!
Fancy D3 use here is just for presentation prettiness purposes... just going to Webpagetest.org, or other synthetic testing tools like New Relic Synthetics, is all you need to do to get started analyzing page load waterfalls.
While LTE usage is rapidly increasing, it still represented < 50% of US mobile subscriptions as of 2014. So it's important to test for worst-case performance.
144 in total!
Total load time: 23.5s
This is a lot of requests! And total load time on 3G is obviously far from ideal. Let's take a look at some of the issues that could be resolved here.Scripts • Images • Fonts/Styles
Ad-related requests, mostly. 114 of our 144 requests...
Like most media companies, a large chunk of our revenue comes from ads.
Revenue is used to pay software developers as well as some others involved in the business.
So we need some other way of making money.
A lot of people like to talk about the future of media and what revenue models will work if ad revenue dries up. These are just a few ideas for alternate business models.
Current Bitcoin exchange rate is ~$245/BTC. If we sell the egg cups for 1/10th BTC and half of that is profit, we have to sell 3,646,677 egg cups to reach Gawker Media's 2014 net revenue of $45 million.
So, we can't eliminate these 114 requests right away. Let's focus on our first-party content...
Now we're looking at 30 requests, much more manageable.
(loaded in 18.8s)
23 requests (loaded in 10.4s)
Our script loader, require.js, followed by a 0.94s gap before the scripts it loads start to come in. 1.67s total delay.
3 requests (loaded in 8.4s)
<script src="dependency1.js"></script> <script src="dependency2.js"></script>
<script src="combined-scripts.js"></script>
<script src="require.js" data-main="combined-scripts.js"></script>
We used the power of waterfall charts to identify some key performance issues to investigate further:
Tools used for this presentation: