This is a migrated thread and some comments may be shown as answers.

Slower initial load with combined script?

7 Answers 130 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Cloud
Top achievements
Rank 1
Cloud asked on 17 Mar 2010, 04:31 AM
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

7 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 17 Mar 2010, 02:26 PM
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.
0
Cloud
Top achievements
Rank 1
answered on 18 Mar 2010, 06:01 AM
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.
0
T. Tsonev
Telerik team
answered on 18 Mar 2010, 01:06 PM
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.
0
Cloud
Top achievements
Rank 1
answered on 19 Mar 2010, 05:32 AM
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.
0
T. Tsonev
Telerik team
answered on 23 Mar 2010, 09:32 AM
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.
0
Cloud
Top achievements
Rank 1
answered on 23 Mar 2010, 09:56 AM
I have attached an image for your reference.
0
T. Tsonev
Telerik team
answered on 23 Mar 2010, 01:43 PM
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.
Tags
ScriptManager and StyleSheetManager
Asked by
Cloud
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Cloud
Top achievements
Rank 1
T. Tsonev
Telerik team
Share this question
or