Thursday, February 08, 2007

testing page load time

In the coming days I will be posting a number of posts that focus on performance testing r.a.d.controls, specifically focusing on how they affect page load time. Before launching into the test results, though, I wanted to present a brief primer on the type of testing that I'll be conducting. Many of these methods are easy to reuse and may help you better tune your own applications.

One of the key tests of performance is determining how long your page takes to load for the average user. Testing this metric can be tricky and it requires that you consider a number of factors, such as server load, latency, packet loss, user connection speed, and (especially in this day of JavaScript heavy, AJAX enabled pages) client-side page load time.

If you have the dollars, you can buy devices (or software) called "WAN Simulators" that give you the power to control many of these factors so you can precisely control your tests. You can introduce latency, simulate average packet loss, and build a test scenario that accurately represents your average user. Even if you don't have hundreds or thousands of dollars for a Simulator, you can still conduct meaningful tests using some simple JavaScript and page analysis tools.

The key when measuring page load time as your users see it is to not rely on server-side time measurements. Your server trace may reveal that your page loaded in 2 milliseconds, but the user may be experiencing a time twice that if you have a number of complex client-side actions that execute on load. Instead, you should load your page in a frame with a JavaScript timer that measures the total time it takes for your page to really load. A great free tool exists that enables you to do this from Numion called (quite obviously) Stopwatch. All you have to do is supply the URL to your site (even a localhost address) and it will tell you exactly how long it takes to load your page, from request to done.

Clearly, there are other measures of performance that must be examined, such as server load, but when it comes to testing and comparing UI components measuring page load time is one of the better tests. So stay tuned for the in-depth look at r.a.d.control performance and have fun running your site through the Stopwatch. Anyone surprised at how long their page really takes to load?

2 comments:

Anonymous said...

hi,

do you have an update link on this test.

Instant Activation Hosting said...

Great post thanks for the sharing your link great commeating your blog