How Google Sped up Gmail | May 14th, 2008
There was an interesting post today on the Gmail blog about how they got GMAIL to load faster, especially on slow connections.
A couple of the things they did were:
- Spriting – combining all the small graphics into a single image and using CSS background image placement to split out the individual icons.
- Request pooling – Combining together seperate XHR requests into a single large request and then parsing out the results.
- Cacheing – making more of the resource requests cacheable by the browser (JavaScript, CSS etc). That way when the user reloads the page, it doesn’t need to download the same resources over and over.
To help them with this task they used proxy trace tools like Fiddler, WireShark, and HTTPWatch. I think Firebug would have been a good option here too. Other things they could have done (and may have) are:
- GZip compression – compressing all your static resources with ZIP making them much smaller to transmit. This works on all major browsers these days.
- Conbining JS and CSS resources – By concatenating all your JavaScript and CSS resources into one, you reduce the number of requests needed and really speed up your site.