Copied to clipboard

Flag this post as spam?

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


  • Rob Watkins 343 posts 593 karma points
    Feb 16, 2012 @ 15:37
    Rob Watkins
    0

    Getting member custom properties very slow

    I need to be able to search on member custom properties for a site, displaying the results in a list. Trouble is, getting the custom properties for each member seems to take ages - with just 95 members it takes about 7 seconds to populate a list of members by getting custom properties with "foreach (Property p in m.GenericProperties)"- not good enough for a public search function.

    Is there any way of speeding this up?

  • Hendy Racher 861 posts 3844 karma points MVP 2x admin c-trib
    Feb 16, 2012 @ 17:29
    Hendy Racher
    0

    Hi Rob,

    If you have uComponents installed, you could take a look at the uQuery GetMembersByXpath method; this does a single DB hit to get all the members in an XML document, and so should be quicker.

    Alternatively how about a Lucene query against the InternalMember index ?

    HTH,

    Hendy

     

  • Rob Watkins 343 posts 593 karma points
    Feb 16, 2012 @ 17:30
    Rob Watkins
    0

    Hmmm, haven't ever looked at the Lucene stuff at all, might be worth a shot! I'll look at the uQuery stuff, thanks!

  • Rob Watkins 343 posts 593 karma points
    Feb 16, 2012 @ 17:45
    Rob Watkins
    0

    I think the problem I have is that I will be searching on a calculated field as it's a geo search - so I generate a geocode from a postcode, then calculate a distance from the stored location for each member, and resturn results based on that.

    I think the problem is I don't know that much about how the members work, and I'm getting bogged down in all the deprecated stuff vs the .NET model that is now recommended, even though it's a lot more annoying :o)

    So are members published to XML then? Is there a built in way to get the members XML document or do I have to use uComponents? No biggie if so, it's already on the site.

  • Rob Watkins 343 posts 593 karma points
    Feb 16, 2012 @ 18:45
    Rob Watkins
    1

    I've tried the uQuery tried, that's blindingly quick, so I've marked that as the answer :o)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies