1

I have used-

var srchResults = profileManager.GetEnumerator();
while (SrchResults.MoveNext()){//Code here}

But it takes a lot of time because the users are near about 4000 or more and I have to show them on search. For example- If I have searched with A then result should show all the users whose Last Name start with letter A.

So what is the best practice/approach to show them within the time. Or is there any provision to fire query on User Profile? So it will reduce the time.

Note: All the searched results are shown on the page without paging all are shown once.

  • Is it compulsory for you to do the server side code? else you can refer to the client side scripting like AngularJS + REST queries that can work more faster. – users1100 Nov 28 '16 at 9:04
  • How about fetching users from search with something like "LastName:A*"? – Jussi Palo Nov 28 '16 at 9:20
  • With the Search Service, we can get the first 200 records only. that's why I have changed to iterate with all users. – Ram Nov 28 '16 at 9:35
  • Yes, I can try this with AngularJS + REST. – Ram Nov 28 '16 at 9:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.