For stress testing purposes we currently have about 10.000 members in our Umbraco install. Whenever we try to retrieve them however, it literally takes over 10 minutes for Umbraco to do so. This is happening in both the regular member section, as well as our custom section where we use the umbraco library. Are we missing some setting? Or just doing something wrong?
List memberList = new List(); List groups = MemberGroup.GetAll.ToList(); foreach (MemberGroup group in groups) { if (group.User.Id == umbraco.BusinessLogic.User.GetCurrent().Id) { memberList.AddRange(group.GetMembers()); } }
For our application, we tied member groups to specific users. We are trying to display all members that got tied to this user as a result. So, we get all the groups, and if that group is linked to the current user, we want all the members of said group added to a list. This works fine for say... 1000 records. But when trying it with numbers like 10.000, it slows to a snails pace.
And yes, I am aware that the functions like the GetAll and GetMembers are older functions that should no longer be used. But thus far I have been unable to get a list of Member objects by using the recommonded functions.
Edit: Okay, we changed our code to check a few things, but this problem ONLY occurs when not logged in as the administrator user, despite the code being exactly the same.
Large amount of items
For stress testing purposes we currently have about 10.000 members in our Umbraco install. Whenever we try to retrieve them however, it literally takes over 10 minutes for Umbraco to do so. This is happening in both the regular member section, as well as our custom section where we use the umbraco library. Are we missing some setting? Or just doing something wrong?
-Ferdy
Hi Ferdy
Could you perhaps show some of the code used to fetch the members?
/Jan
For our application, we tied member groups to specific users. We are trying to display all members that got tied to this user as a result. So, we get all the groups, and if that group is linked to the current user, we want all the members of said group added to a list. This works fine for say... 1000 records. But when trying it with numbers like 10.000, it slows to a snails pace.
And yes, I am aware that the functions like the GetAll and GetMembers are older functions that should no longer be used. But thus far I have been unable to get a list of Member objects by using the recommonded functions.
Edit: Okay, we changed our code to check a few things, but this problem ONLY occurs when not logged in as the administrator user, despite the code being exactly the same.
-Ferdy
is working on a reply...