Wednesday, July 09, 2008

How Much JavaScript is Too Much?

One of the things I try to do on my blogs (especially my other blog) is to get as much of the processing to be done server side, with as few outside dependencies as possible.  There are a few reasons for this.  One is that I can better control any problems that may occur because the source is more easily known.  Second, it allows for more server side caching.  Third is that it is a pendulum reaction to when I used to host on Blogger and everything I wanted extra had to be provided through a third party via JavaScript.  My old Blogger blogs got to be really slow as I tried to add more and more features.

I like to think that I keep a nice balance of server side and client side processing for all my sites.  One of the political blogs that I keep tabs on is Wigderson Library & Pub.  James is a big fan of advertising, and JavaScript.  Luckily I only read his site through his RSS feed... because if I actually had to go to his site to check his content, it would drive me nuts.  For fun, I decided to "battle" Jim using Webslug, which measures comparative load time performance between two sites.  Here are the results:

NickVsWiggy

 

You're reading that right... 192 seconds, or over 3 minutes for the page to finish loading.  Now then... it's not as bad as it seems, since the positioning of the JavaScript allows the page to render the majority of its content before that.  But still... at what point do you declare that you have too much JavaScript?  And for folks like Jim, who still use third party applications like Blogger for all his content, what are the alternatives to speed load time?

#    9:30 AM by Nick | 2 Comments |