Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

For some reasons, searching for Users or Groups in SharePoint is extremely slow. For example, a simple call to

results =
    SPUtility.SearchWindowsPrincipals(SPContext.Current.Site.WebApplication,
              "Stum",SPPrincipalType.User, 50, out maxReached);

takes 21 seconds.

Querying Active Directory directly takes less than a second, and so does a SQL Query against the Profile Database.

I don't understand why it takes so long, but it's consistent with doing a similar query in the SharePoint built-in People Picker.

Any way to speed this up to normal speeds?

share|improve this question
Did you ever find out what was causing this that you can give in an answer? Or is there more info you can add to the question? – Alex Angas Jul 2 '11 at 3:14
We need more information to answer your question. Please edit your post and add details as requested by the community. It will be closed for now, but don't worry - once you have improved the question flag a moderator and it can be reopened. See How do I ask questions here? for general guidelines. – Alex Angas Aug 3 '11 at 6:00

closed as too localized by SPDoctor, Alex Angas Aug 3 '11 at 5:59

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.