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

onresolvescriptreference called 17 thousand times

1 Answer 67 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 11 Sep 2012, 03:45 PM
I have a page with a telerik:RadScriptManager.  According to a profiler I'm using, in a single page load Telerik.Web.UI.RadScriptManager.OnResolveScriptReference() is called 16,949 times and accounts for a half second of my page load times.  I added my own handler for ResolveScriptReference and it does seem to be called quite a lot.  The Scripts collection has 7 scripts.  In my own handler, I can see that it's resolving the same scripts over and over: Telerik.Web.UI.Common.Core.js, Telerik.Web.UI.Common.jQuery.js, etc.

This project using Telerik.Web.UI.DLL 2011.1.519.40.  I know that's an older version, I'm not sure i can get authorized to upgrade it (due to a fear of breaking something else).  I'm hoping there is some problem in the way this control is being used that I can alter in order to fix the problem, but I don't even know where to start.

Matt

1 Answer, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 17 Sep 2012, 07:06 AM
Hi Matthew,

In general the OnResolveScriptReference method is called by the OnPreRender event handler for each script reference in the Scripts collection of the ScriptManger, which make it quite unusuall to be executed 16,949 times as it's in your case. In order to resolve this issue, please try to provide a sample page which I could test with the latest version of our controls.

Regards,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ScriptManager and StyleSheetManager
Asked by
Matthew
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Share this question
or