In http://drupal.org/node/173957 I asked about why the .js and .css files are being re-requested on every pageview. I still haven't worked out why this is happening. However while researching I turned up something interesting.

High Performance Websites is a presentation going over some rules the yahoo's have developed about high performance websites. These are the people who developed YSlow, http://developer.yahoo.com/yslow/ ...

The backend performance is only a small part of the end user perceived performance. That it's "front end" things ..

I just took a look at loading a page on my site, according to firebug it took 4 seconds, of which 97 ms was to load the initial HTML page.

If you watch the above presentation he says, towards the end, that both internet exploiter and firefox load javascript files one at a time. Browsers can generally load page components in parallel, but javascript page components cannot load in parallel.

I notice that this page has 4 javascript components, and that indeed they do not load in parallel. The elapsed time to download these 4 components is close to 1.5 seconds, and it's only 40 kb of data, on a fast DSL line.

The Drupal performance admin panel offers the ability to crunch & merge .css files... why doesn't Drupal offer the same for .js files?

Comments

reikiman’s picture

Ah, I took a look at drupal v6 and it appears a javascript cache exists there... http://api.drupal.org/api/function/drupal_get_js/6

- David Herron - http://7gen.com/