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

Improve LDAP performances when updating records, especially when many user entries exists #1975

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

zamentur
Copy link
Member

@zamentur zamentur commented Oct 21, 2024

The problem

With 150 users and 12 apps, a yunohost user create take 1min
With 350 users and ~25 apps, a yunohost user create take hours maybe days.

Solution

Replace ldap.modlist.modifyModlist by an optimize code that work for yunohost.

Test in a dev platforme (with ssd 600Mbps) : the 169th user creation is made in ~3s.

PR Status

Need more test to be sure it doesn't break something...

How to test

for i in {1..150}; do echo $i; yunohost user test$i -d ynh.local -F "test test" -p "Thisisadummypa:ssw0rd"; done

@alexAubin alexAubin changed the title Enh perf ldap update Improve LDAP performances when updating records, especially when many user entries exists Oct 21, 2024
src/utils/ldap.py Show resolved Hide resolved
src/utils/ldap.py Outdated Show resolved Hide resolved
@Salamandar
Copy link
Contributor

Not sure about your last commits on [user] -> user, but apart from that, LGTM.

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

Successfully merging this pull request may close these issues.

2 participants