GetAuthenticatedUser? Padding 5 secs on Queries

Topics: Customizing Orchard, Writing modules
Nov 6, 2013 at 12:08 PM
Edited Nov 6, 2013 at 12:14 PM

I'm still on Orchard 1.6

I've got a page which renders a list of a specific content type called Resources. I then have filters which are basically taxonomy terms that tag each Resource. When filters are selected, I make a call to the controller to update the view with a filtered list of Resources.

However, it's taking ages to update (from 5-8 seconds), even when I used caching. I installed the mini-profiler module and saw this specific block take a long time (between 5 - 8 seconds, most of the executing time).

Does this look familiar to anyone:
ToReadOnlyCollection Orchard.Data.IRepository<T>.Fetch <.ctor>b__0 Loaded Orchard.ContentManagement.Handlers.IContentStorageFilter.Loaded Orchard.ContentManagement.Handlers.IContentHandler.Loaded <Get>b__b Invoke Get Get Get GetAuthenticatedUser OnAuthorization EndProcessRequest
DECLARE @p0 INT = 2;

SELECT userrolesp0_.Id AS Id40_
        ,userrolesp0_.UserId AS UserId40_
        ,userrolesp0_.Role_id AS Role3_40_
FROM Orchard_Roles_UserRolesPartRecord userrolesp0_
WHERE userrolesp0_.UserId = @p0
Or is this just a red herring with a bigger underlying issue? I've also tried to disregard filters/taxonomy terms and just return the entire content type result set (no filtering, no .where, no hqlquery predicates) and still got the same result.

I have a completely similar implementation done in 1.7 and it executes/loads way faster (less than a second).