The Performance Golden Rule
This phenomenon of spending only 10–20% of the response time downloading the HTML document is not isolated to Yahoo!'s home page. This statistic holds true for all of the Yahoo! properties I've analyzed (except for Yahoo! Search because of the small number of components in the page). Furthermore, this statistic is true across most web sites. Table 1-1 shows 10 top U.S. web sites extracted from http://www.alexa.com. Note that all of these except AOL were in the top 10 U.S. web sites. Craigslist.org was in the top 10, but its pages have little to no images, scripts, and stylesheets, and thus was a poor example to use. So, I chose to include AOL in its place.
Table 1-1. Percentage of time spent downloading the HTML document for 10 top web sites
Empty cache | Primed cache | |
|---|---|---|
AOL | 6% | 14% |
Amazon | 18% | 14% |
CNN | 19% | 8% |
eBay | 2% | 8% |
14% | 36% | |
MSN | 3% | 5% |
MySpace | 4% | 14% |
Wikipedia | 20% | 12% |
Yahoo! | 5% | 12% |
YouTube | 3% | 5% |
All of these web sites spend less than 20% of the total response time retrieving the HTML document. The one exception is Google in the primed cache scenario. This is because http://www.google.com had only six components, and all but one were configured to be cached by the browser. On subsequent page views, with all those components cached, the only HTTP requests were for the HTML document and an image beacon.
In any optimization effort, it's critical to profile current performance to identify where you can achieve the greatest improvements. It's clear that the place to focus is frontend performance. ...