Strategy: Biggest Performance Impact is to Reduce the Number of HTTP Requests
Low Cost, High Performance, Strong Security: Pick Any Three by Chris Palmer has a funny and informative presentation where the main message is: reduce the size and frequency of network communications, which will make your pages load faster, which will improve performance enough that you can use HTTPS all the time, which will make you safe and secure on-line, which is a good thing.
The benefits of HTTPS for security are overwhelming, but people are afraid of the performance hit. The argument is successfully made that the overhead of HTTPS is low enough that you can afford the cost if you do some basic optimization. Reducing the number of HTTP requests is a good source of low hanging fruit.
From the Yahoo UI Blog:
Reducing the number of HTTP requests has the biggest impact on reducing response time and is often the easiest performance improvement to make.
From the Experience of Gmail:
…we found that there were between fourteen and twenty-four HTTP requests required to load an inbox… it now takes as few as four requests from the click of the “Sign in” button to the display of your inbox.
So, design higher granularity services where more of the functionality is one the server side than the client side. This reduces the latency associated with network traffic and increases performance. More services less REST?
Other Suggestions for Reducing Network Traffic:
- DON’T have giant cookies, giant request parameters (e.g. .NET ViewState).
- DO compress responses (gzip, deflate).
- DO minify HTML, CSS, and JS.
- DO use sprites. DO compress images at the right compression level, and DO use the right compression algorithm for the job.
- DO maximize caching.