Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ferdy Hoefakker 214 posts 248 karma points
    Mar 09, 2011 @ 15:29
    Ferdy Hoefakker
    0

    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

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 09, 2011 @ 20:12
    Jan Skovgaard
    0

    Hi Ferdy

    Could you perhaps show some of the code used to fetch the members?

    /Jan

  • Ferdy Hoefakker 214 posts 248 karma points
    Mar 10, 2011 @ 08:53
    Ferdy Hoefakker
    0
    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.

    -Ferdy

Please Sign in or register to post replies

Write your reply to:

Draft