November 10th, 2006

Dare Obasanjo writes on a study comparing percentage of site visits and page load times:

If you are a developing a consumer web site whose revenue depends on the number of page views you get, you need to print out that post and nail it to every bulletin board in your offices. One big problem with the AJAX craze that has hit the Web is how much slower websites have become now that using Flash and DHTML to add "richness" to Web applications is becoming more commonplace. My mind now boggles at the fact that I now see loading pages that last several seconds when visiting Web sites more and more these days.

I agree with Dare that page load times can be killer when it comes to getting page visits, but I don't think all of the blame can be dropped at Ajax's door.

True a large Ajax library can add to download burdens and slow the page access. This just means that we need to keep scripts small as possible; not that we have to eliminate all things Ajaxian.

I embed larger photographs in several of my posts and these can slow up the page loads. In fact, I just created an Ajax application to open a larger image in the page when a smaller image is clicked so that I can start embedding smaller images and hopefully increase the speed of the page loads.

If the page is too dependent on external web services, such as Technorati links or Google ads or such, these can really slow a page up. These aren't necessarily using Ajax, as much as they are increasing a dependency on external sources. Minimize this as much as possible, and you won't have to put your page at the mercy of some other site.

The speed of the host is one of the biggest impacts associated with web page loads. Too many hosts are loading too many sites on too few servers. We have contention for disc access, web server access, not to mention allocated bandwidth–the outgoing pipe is finite. Now, Ajax can add to this burden if many requests are being made to the server from the page. For instance, polling to see if a new comment has been added and to refresh the page is a pretty frivolous use of Ajax and web server resources UNLESS, such is important to the site.

The example that Dare uses, Yahoo Mail, most likely loads slowly because of stresses against the server and the database holding the data–especially the database holding the data. Yes, hits against the database or other data source is still the number one reason for slow page loads. We could probably quadruple the size of most Ajax scripts at sites and still not equal the performance hit of an overloaded data server.

Comments
1
Dare Obasanjo - 5:52 pm 11/10/2006

I doubt that the slowness of the Yahoo! Mail beta has anything to do with the DB because the service is quite snappy when you use the non-AJAX version.

2
Shelley - 6:55 pm 11/10/2006

Dare, I can agree that a poorly designed Ajax application can hurt a site, just as a poorly designed back-end, or a poorly configured web server.

I turned scripting off and accessed Yahoo Mail and it's really no faster than the Ajax version. Neither was too bad, compared to other pages. Not the best, but not the worst.

Over-engineered code can occur at any layer in a web site. It's the developer that has to take responsibility, not the technology.

3

This is a big reason why I love jQuery. The library itself is flyweight (<20kb), and your own code ends up significantly briefer too. Then if your use of Javascript is mainly in progressive enhancement style, you end up with just not very much to load.

(And that is, of course, exactly your point.)

Thanks to all those who have contributed to the discussion. Comments are now closed, but you can contact the author of the post directly.