Archives For performance

Benchmarking a Web site is the simple act of measuring its performance. Measurements may look at how long it takes a page to load in the client (see my post on the YSlow Firefox plug-in). This can be a reflection of the page itself—the amount of images, HTML, JavaScript, CSS, and other media—and a reflection of the client: their download speed, their computer speed, the browser they’re using, etc. Because of the client-side factors, this kind of benchmarking is best, I feel, to just analyze the amount of information being downloaded and how efficiently that’s taking place (again, see YSlow for more on this).

On the other side of the equation, you can perform benchmarks on the server. Finding, and later improving upon, these measurements will improve the experience for all clients, regardless of download speed, computer, or browser type. This is particular important when using server-side technologies like PHP.

Among the many utilities available to benchmark a Web site is Siege, from Joe Dog Software. One of the nice things about Siege, besides it being free, is that it tests a Web server under duress, something that’s impossible for a single individual to replicate. So you can tell Siege to access your site using X number of simulataneous connections and then see the result. On the downside, you have to compile it on Unix-like systems, including Mac OS X, in order to use it. For more, see the Siege Web site and it’s simple-to-follow manual.

This entry is part 1 of 2 in the series Speeding Up Web Sites using Yahoo!'s YSlow

On Yahoo!’s Developer pages you can find the YSlow plug-in for the Firefox Web browser (the plug-in works in conjunction with Firebug, which you should probably already be using anyway). After installing YSlow (and Firebug, if you haven’t already), restart Firefox, then load your Web page in Firebox. Click on the YSlow icon in the lower-right corner of the browser window, and you’ll see:

  • A “report card” for the page’s performance
  • The files and images loaded on that page, including JavaScript and CSS
  • Listings of specific strengths and weaknesses of the page

Using the built-in YSlow tools, you can also view: page statistics (total size of all files, number of HTTP requests made, etc.), all of the CSS compiled together, and all of the JavaScript involved. You can even test the JavaScript using JSLint. For more on using YSlow, check out its documentation or this screencast.

In case you’re curious, when I tested my site’s home page, I got a ‘B’ (85), which is a decent start. To improve the performance, I need to add expiration headers, use a CDN, and add ETags. And, to be honest, I didn’t even know what these last two were!

Update: I’ve started fixing some of the issues addressed by YSlow. You can read about that process in this other post.