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

Bad performance practices with Rad Controls

1 Answer 85 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Andrew Lawrence
Top achievements
Rank 1
Andrew Lawrence asked on 11 Mar 2009, 06:52 AM
After upgrading from RadControls Classic I noticed various changes to the way scripts are registered that will cause performance to be much worse for the latest version of RadControls compared to the Classic version.

Firstly, the EnableScriptCombine property of RadScriptManager suffers from a big weakness.
When we use this property, a WebResource is called with a querystring like so:

Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_AjaxManager_4_ScriptManager_HiddenField&compress=0&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-AU%3a0d787d5c-3903-4814-ad72-296cea810318%3aea597d4b%3ab25378d2

I notice that this includes the ID of the ScriptManager in the querystring. The problem is that if we move to a page which has a slightly different master page hierarchy, the ID of the ScriptManager changes and so does the url of the WebResource:

Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_AjaxManager_4_ScriptManager_HiddenField&compress=0&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-AU%3a0d787d5c-3903-4814-ad72-296cea810318%3aea597d4b%3ab25378d2

What does this mean for the end user? Well it means that they will not be able to retrieve the cached copy of the resource (even though I presume it is exactly the same), They have to redownload the entire resource, which could easily be 100k+ even after compression.

Because of this I think that it is better for me to set EnableCombineScripts to false. It is a pity that the page weight and number of HttpRequests has increased for the new version though. Here is an example of script sizes from my site's homepage:

Using RadAjax Classic
5 scripts : 13kb, 9kb, 5kb, and 4kb
Using RadAjax for ASP ,NET AJAX
9 scripts : 27kb, 17kb, 10kb, 9kb, 9kb, 9kb, 8kb, 8kb and 8kb respectively

Now I know that these scripts are not the only indicator of performance but an increase of 4 HttpRequests and 74kb seems excessive to me. I guess I was hoping for more.

Perhaps you can suggest a way around the issue with combining scripts?

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 13 Mar 2009, 09:23 AM
Hello Andrew Lawrence,

Rendering the ID of the script manager is required when using script combination and cannot be avoided. To keep the same URL on all pages the ID of the ScriptManager needs to be the same.
There are at least two additional javascript files which are required by ASP.NET Ajax. The other extra file is our core javascript library - Core.js which is used by all controls.

Regards,
Atanas Korchev,
the Telerik dev team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Ajax
Asked by
Andrew Lawrence
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or