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

[Solved] Poor Security Trimming Performance

1 Answer 22 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jon
Top achievements
Rank 1
Jon asked on 20 Apr 2012, 08:20 AM
I changed a simple Jquery menu to a telerik menu on my site.
The telerik menu is nice however the security trimming is very slow. It adds around 3 seconds to page load time.

As soon as I set security trimming to false it speeds right up.

Is there any way to have it security trim and have good performance?

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 20 Apr 2012, 09:45 AM
Hello Jon,

 
The Telerik Menu component uses the OnAuthorization method of the AuthorizationAttribute. For this purpose it needs to generate the correct AuthorizationContext, which includes the ActionContext and ControllerContext. This operation will be slow if you tries the component in Debug mode. Once you switch to Release mode all AuthorizationContext objects will be cached and the performance will be dramatically improved.

All the best,
Georgi Krustev
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
Tags
Menu
Asked by
Jon
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or