maartenba/MvcSiteMapProvider — Issue #21: AuthorizeAttributeAclModule significantly slower than version 3.1.0
Author: mrfoster
Created: 2012-02-04 16:14:11+00:00
State: open

The following line of code within AuthorizeAttributeAclModule.cs caused a significant performance problem for me when rendering menus.

controllerContext.Controller = ControllerBuilder.Current.GetControllerFactory().CreateController(requestContext, controllerName) as ControllerBase;

I guess it must be attempting to retrieve the attributes every time the menu is rendered instead of caching them.

I also noticed the same module performed about 6 times quicker in version 3.1.0. (found this by profiling the wrong version of code).

Fortunately for me, the feature had been turned on by accident and wasn't required.