Prototype & Scriptaculous are taking 1-3 seconds each to load - why?

I

iporter

Using Firebug's 'Net' Panel, I can visit http://script.aculo.us and
watch prototype.js file load in just over 400ms, and scriptaculous.js
in just under 400ms. Additional files such as effects.js also load in
a couple of hundred milliseconds.

However, when on my own page, http://foremost.intraspin.com,
prototype.js consistently takes around 1.9 seconds, or 1900ms to load,
and scriptaculous.js often over 3500ms!

I found that my web server wasn't using GZIP compression, so have now
implemented it and used a tool (http://www.pipeboost.com) to verify
it's working. However, prototype,scriptaculous and associated files
are still taking in the order of seconds to load.

I can use jsmin of YUI Compressor to improve the load speed further,
but http://script.aculo.us doesn't do this, so I think there will
still be a problem. Can anyone suggest what the problem is, or how to
investigate further?

I'm using IIS6 on Windows 2003.

Thanks,
Iain
 
T

Thomas 'PointedEars' Lahn

iporter said:
I can use jsmin of YUI Compressor to improve the load speed further,
but http://script.aculo.us doesn't do this, so I think there will
still be a problem. Can anyone suggest what the problem is, [...]

The problem is that you are using Prototype.js and Script.aculo.us.


HTH

PointedEars
 
I

iporter

Thomas, I understand that some consider the load weight of Prototype
and Scriptaculous not worth the benefits they offer, but that was not
my question.

The Scriptaculous website appears to load the files in question
quickly enough for my needs - my problem is that my website doesn't -
can anyone suggest why?
 
T

Thomas 'PointedEars' Lahn

iporter said:
Thomas, I understand that some consider the load weight of Prototype
and Scriptaculous not worth the benefits they offer,

The supposed benefits these libraries seem to offer to the uninitiated are
outweighed by their disadvantages as apparent to the experienced developer,
which includes, but is not limited to, extreme code size due to lack of
proper software engineering in creating them.
but that was not my question.

That's too bad.
The Scriptaculous website appears to load the files in question
quickly enough for my needs - my problem is that my website doesn't -
can anyone suggest why?

There is a problem with your Web site or the way you use these libraries;
neither of those is on-topic here.


PointedEars
 
I

iporter

Ed, thanks for your help - interesting that scriptaculous is using an
older version of Prototype.

YSlow is a useful tool that I have been using, thanks.

I've realised that loading the site in question is causing my server's
CPU usage to max out, and that the w3wp.exe process is responsible.
Does this shed any light? I don't understand - as far as I'm aware,
javascript is client-side script, and thus the server has only to send
a small file to the client. Why would the CPU usage be any different
from an image of similar size?

Thanks,
Iain
 
D

dhtmlkitchen

Yep, there's also a plugin for Firefox.

The Firebug Net panel would also verify which components are gzip'd.
Here's how:

F12:
Net > JS > Headers
Response Headers____
Content-Encoding gzip

If you don't see "Content-Encoding gzip" in the response headers, it's
not being sent.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top