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

Discussion in 'Javascript' started by iporter, Dec 26, 2007.

  1. iporter

    iporter Guest

    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
    iporter, Dec 26, 2007
    #1
    1. Advertising

  2. Re: Prototype & Scriptaculous are taking 1-3 seconds each to load- why?

    iporter wrote:
    > 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
    --
    realism: HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness: XHTML 1.1 as application/xhtml+xml
    -- Bjoern Hoehrmann
    Thomas 'PointedEars' Lahn, Dec 26, 2007
    #2
    1. Advertising

  3. iporter

    iporter Guest

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

    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?
    iporter, Dec 26, 2007
    #3
  4. Re: Prototype & Scriptaculous are taking 1-3 seconds each to load- why?

    iporter wrote:
    > 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
    --
    "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>
    Thomas 'PointedEars' Lahn, Dec 26, 2007
    #4
  5. iporter

    Ed Guest

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

    iporter wrote:
    > 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.
    Ed, Dec 27, 2007
    #5
  6. iporter

    iporter Guest

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

    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
    iporter, Dec 27, 2007
    #6
  7. iporter

    Guest

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

    On Dec 26, 8:17 pm, Ed <> wrote:
    > iporter wrote:
    > > 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
    > > 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/
    >

    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.
    , Dec 30, 2007
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad
    Replies:
    7
    Views:
    16,918
    tshad
    Mar 11, 2005
  2. Will Handley
    Replies:
    1
    Views:
    571
    Nigel Wade
    Dec 10, 2003
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,764
    Smokey Grindel
    Dec 2, 2006
  4. Michael Tan
    Replies:
    32
    Views:
    940
    Ara.T.Howard
    Jul 21, 2005
  5. Bryan Richardson

    Ruby Prototype/Scriptaculous Wrapper

    Bryan Richardson, Dec 19, 2008, in forum: Ruby
    Replies:
    0
    Views:
    78
    Bryan Richardson
    Dec 19, 2008
Loading...

Share This Page