Surprisingly, Single() should take quite some time in such a small list. I have to believe that something else is happening here. A call to ps.FindAll() can return an object that does not cache it, and forces you to make an expensive call to some resource at each iteration in Single() .
You might want to use the profiler to investigate where the time goes when you click this line. I would also like to take a look at the implementation of FIndAll() because it was returning something unusually expensive for iteration.
So, after reading your code a little closer, it makes sense why Single() so expensive. The PrincipalSearcher class uses the directory service store as a store for search. It does not cache these results . It affects your performance.
You probably want to materialize the list using ToList() or ToDictionary() so that the main information is accessed locally.
You can also completely eliminate this type of code and use FindOne() instead, which allows you to directly query what you want.
But if you can't use this, then something like this should work better:
result.ToDictionary(u => u.SamAccountName)[usr.WEBUSER]
source share