The site is fast until the member logs in. After login this code can take more than a minute to execute. If I remove the if...MemberHasAccess bits the site is fast always.
The mini profiler points out that this sql query is slow.
DECLARE @0 nvarchar(40) = N'366e63b9-880f-4e13-a61c-98069b029728',
@1 nvarchar(4000) = N'myMemberName';
SELECT un.*
FROM umbracoNode AS un
INNER JOIN cmsMember2MemberGroup
ON un.id = cmsMember2MemberGroup.MemberGroup
LEFT JOIN (SELECT umbracoNode.id, cmsMember.LoginName FROM umbracoNode INNER JOIN cmsMember ON umbracoNode.id = cmsMember.nodeId) AS member
ON member.id = cmsMember2MemberGroup.Member
WHERE (un.nodeObjectType=@0)
AND (member.LoginName=@1)
I confirmed that this query is the problem by running the query manually.
Umbraco.MemberHasAccess is slow when member is logged in after upgrading to 7.7.6
After upgrading from 7.6.5 to 7.7.6, Umbraco.MemberHasAccess is very slow on a small site with only 50 members.
The issue is in a partial for the main menu. The relevant code is:
and
The site is fast until the member logs in. After login this code can take more than a minute to execute. If I remove the if...MemberHasAccess bits the site is fast always.
The mini profiler points out that this sql query is slow.
I confirmed that this query is the problem by running the query manually.
The site uses SQL CE
Has anyone else run into this?
Update - the same query generated in 7.6.5 is:
The new query runs slowly on the 7.6.5 database and the old query runs quickly on the 7.7.6 database. The new query is clearly less efficient.
I hope someone can provide some insight here.
You might be better logging this as an issue on the issue tracker:
http://issues.umbraco.org/dashboard
I created an issue: http://issues.umbraco.org/issue/U4-10701
is working on a reply...