Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / December 2007



Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
iporter - 26 Dec 2007 10:03 GMT
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
Thomas 'PointedEars' Lahn - 26 Dec 2007 11:38 GMT
> 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
Signature

   realism:    HTML 4.01 Strict
   evangelism: XHTML 1.0 Strict
   madness:    XHTML 1.1 as application/xhtml+xml
                                                   -- Bjoern Hoehrmann

iporter - 26 Dec 2007 12:36 GMT
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?
Randy Webb - 26 Dec 2007 12:48 GMT
iporter said the following on 12/26/2007 7:36 AM:
> 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.

Welcome to Usenet. You post, we discuss. You get an answer, great. You
don't, you move on. This isn't a help desk.

> 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?

It could be anything from server settings, server speed, internet
traffic all the way down to how the worms are eating under your house.

Signature

Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

Thomas 'PointedEars' Lahn - 26 Dec 2007 21:23 GMT
> 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
Signature

"Use any version of Microsoft Frontpage to create your site. (This won't
prevent people from viewing your source, but no one will want to steal it.)"
 -- from <http://www.vortex-webdesign.com/help/hidesource.htm>

Ed - 27 Dec 2007 04:17 GMT
> 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?

You could try using YSlow:

 http://developer.yahoo.com/yslow/

Also, I notice that http://script.aculo.us is using an older version
of
prototype.js that is barely half the size of the one you are using.
iporter - 27 Dec 2007 10:43 GMT
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
dhtmlkitchen@gmail.com - 30 Dec 2007 19:35 GMT
> > I can use jsmin of YUI Compressor to improve the load speed further,
> > buthttp://script.aculo.usdoesn't do this, so I think there will
[quoted text clipped - 4 lines]
>
>  http://developer.yahoo.com/yslow/

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.

> Also, I notice thathttp://script.aculo.usis using an older version
> of
> prototype.js that is barely half the size of the one you are using.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.