Slower initial load with combined script?

8 posts, 0 answers
  1. Cloud
    Cloud avatar
    24 posts
    Member since:
    Oct 2008

    Posted 16 Mar 2010 Link to this post

    Hi all,

      I tried to improve the performance of my website by enabling the combine script option in RadScriptManager.

     <telerik:RadScriptManager ID="ScriptManager1" runat="server" EnableScriptCombine="true" >
     </telerik:RadScriptManager>

     However, i found that the page loads slower than disabling this feature in the initial load (no cache in the browser).
     With the help of fiddler, i can see that the actual transfer time is faster but seem the browser take longer time to process the script.
     And the size of the combined script is much larger than seperated script resources.

     Here is the figure:

     combined : 272,245 
     Individual : 17,324 + 18,714 + 5,147 + 9,743 + 10,319 + 7,074 + 17,994 + 4,841 + 10,097 + 1,705 + 9,224 + 2,588 = 114,770

  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 17 Mar 2010 Link to this post

    Hello Cloud,

    Can you please check whether the script is compressed please? This will decrease the file size significantly. You can check the Content Encoding response header - it should say "gzip".

    Alternatively, you can try the CDN support of RadScriptManager to load the files from our cloud storage.

    Sincerely yours,
    Veskoni
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Cloud
    Cloud avatar
    24 posts
    Member since:
    Oct 2008

    Posted 18 Mar 2010 Link to this post

    Here is the header :

    HTTP/1.1 200 OK
    Server: Microsoft-IIS/5.1
    Date: Thu, 18 Mar 2010 04:58:00 GMT
    X-Powered-By: ASP.NET
    X-AspNet-Version: 2.0.50727
    Content-Encoding: gzip
    Cache-Control: public, max-age=31535958
    Expires: Fri, 18 Mar 2011 04:57:20 GMT
    Vary: User-Agent
    Content-Type: application/x-javascript
    Content-Length: 272245

    It is an intranet application and not suggested to use CDN.
  5. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 18 Mar 2010 Link to this post

    Hi Cloud,

    Combining requests mostly benefits internet sites, as the overhead for opening new connections is much more noticeable there. For fast intranet sites this might not be a factor at all.

    The faster processing of the non-combined resources might be due to use of multi-threading, at least in the receive/decompress stage. Scripts still need to be evaluated in-order.

    If your benchmarks say it's slower then don't use script combining. Everything else is just theory.

    I hope this helps.

    Regards,
    Tsvetomir Tsonev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Cloud
    Cloud avatar
    24 posts
    Member since:
    Oct 2008

    Posted 19 Mar 2010 Link to this post

    I will turn it off in the intranet application.

    Can you also explain why the file size become larger (nearly 2 times of the original).

    Thx.
  7. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 23 Mar 2010 Link to this post

    Hello,

    My tests didn't confirm this. I'm attaching a screenshot from Firebug that shows that the size is smaller when using script combining. Here's the test page I've used:

    <telerik:RadScriptManager ID="ScriptManager1" EnableScriptCombine="false" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadTabStrip runat="server" ID="TabStip1" MultiPageID="Multipage1" SelectedIndex="0">
        <Tabs>
            <telerik:RadTab runat="server" Text="Sales" PageViewID="PageView1">
            </telerik:RadTab>
            <telerik:RadTab runat="server" Text="Contact Information" PageViewID="PageView2">
            </telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" RenderSelectedPageOnly="false">
        <telerik:RadPageView runat="server" ID="PageView1">
            page view 1
        </telerik:RadPageView>
        <telerik:RadPageView runat="server" ID="PageView2" Width="460px">
            page view 2
        </telerik:RadPageView>
    </telerik:RadMultiPage>

    I hope this helps.

    Regards,
    Tsvetomir Tsonev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  8. Cloud
    Cloud avatar
    24 posts
    Member since:
    Oct 2008

    Posted 23 Mar 2010 Link to this post

    I have attached an image for your reference.
  9. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 23 Mar 2010 Link to this post

    Hello Cloud,

    Can you, please, record the two browsing sessions with FiddlerCap? We're probably missing something here and a complete log will help us a lot.

    Greetings,
    Tsvetomir Tsonev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017