Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse bound connection to improve performance #146

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pgodel
Copy link

@pgodel pgodel commented Dec 18, 2014

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.

@limitium
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants