Wednesday, August 16th, 2006

How to Profile and Optimize Ajax Applications

Category: Examples, Tip

So, you’re using Ajax in your application. Great. It’s chugging happily along, working well, doing it’s job, but you have this nagging feeling that you’ve forgotten something along the way. So, you wait and see if it comes up – and it does. In a bad way. Your application isn’t written for performance and things come to a grinding halt. What’s a desperate coder to do? Well, take some tips from someone who knows (Brad Neuberg) and learn what you can do to salvage your application.

I’ve been asked by a few folks recently on how to profile an Ajax application and improve its performance, so I thought I would detail some of the specific and general strategies to do this in a tutorial here.

He divides up the lengthy post into different topics:

  • Premature Optimization is the Root of All Evil…
  • …But Order of Magnitude is Important
  • Scalability vs. Performance
  • The Profiling Infrastructure, or, The Scientific Mind
  • Collecting Data
  • Browser Caches, Local Proxies, and Remote Servers
  • Finding Bottlenecks, or Hunt the Wumpus
  • Specific Ajax Performance Tips
  • Perceived Performance
  • Knowing When to Stop

Definitely a lot of content here, but it’s all great stuff. Each of the sections provides some good tips on the topic as well as some of his own personal experiences in situations where it helped. And, of course, in my personal opinion, the last one is one of the most crucial – optimization could go on forever, and it’s important to maintain the balance of too much/not enough in your application.

Posted by Chris Cornutt at 8:08 am
3 Comments

+++--
3.6 rating from 24 votes

3 Comments »

Comments feed TrackBack URI

Brad Neuberg knows his stuff, I usually end up at his site when searching for niche Javascript tips (such as “speeding up Flash’s ExternalInterface”) – he’d done some great research in that area, among others. I agree with his points on HTTP traffic (minimizing requests,) and “premature optimization,” in particular.

Comment by Scott Schiller — August 16, 2006

Thanks for the nice comments Scott!

Best,
Brad

Comment by Brad Neuberg — August 16, 2006

Nice article, though I was hoping for a discussion of a wider range of specific solutions. For example, the idea of lazy loading / lazy instantiation is not mentioned, and that can make massive differences, particularly on controls like trees and tabbed containers.

Comment by Michael van Ouwerkerk — August 17, 2006

Leave a comment

You must be logged in to post a comment.