LDAP user search very slow
Created by: bytheway
The past few releases gitlab has felt very slow in pushing/fetching. I did some testing and found that the gitlab-shell call to gitlab to do the ldap authorization took 15 seconds.
I looked back in history, and the old code to do the lookup was:
ldap.connection.search(base: dn, scope: Net::LDAP::SearchScope_BaseObject, size: 1).blank?
The new code is equivalent to:
ldap.search(base: dn)
We've lost the scoping and sizing and are forcing the ldap search to go against the whole subtree.