LdapBundle icon indicating copy to clipboard operation
LdapBundle copied to clipboard

Reuse bound connection to improve performance

Open pgodel opened this issue 10 years ago • 1 comments

When connecting to an LDAP server on development, I noticed the ldap_bind() function would take around 10 seconds to respond. This showed me that the ldap_open() and ldap_bind() is called 2 or 3 times in one request cycle, even for same username/password.

I implemented this reuse of the bound resource and have been able to reduce the request time considerably. I propose to implement this. Since it is possible to bind a connection with different usernames, I am keeping a mapping of username => resource to have separate connections for different users.

pgodel avatar Dec 18 '14 15:12 pgodel

What about five ldap_search calls with same parameters in authentication process?

limitium avatar Jul 23 '15 13:07 limitium