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 synchronization efficiency #16994

Merged
merged 3 commits into from Sep 15, 2021

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Sep 8, 2021

The current LDAP sync routine has order n^2 efficiency. This change reduces this
to order n.log n.

Signed-off-by: Andrew Thornton art27@cantab.net

The current LDAP sync routine has order n^2 efficiency. This change reduces this
to order n.log n.

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added this to the 1.16.0 milestone Sep 8, 2021
@6543 6543 added the performance/speed performance issues with slow downs label Sep 8, 2021
@zeripath
Copy link
Contributor Author

zeripath commented Sep 9, 2021

If we can get the LDAP search and the DB to preorder these things the main algorithm is only order n.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 9, 2021
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Sep 10, 2021
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Sep 15, 2021
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@976db2a). Click here to learn what that means.
The diff coverage is 42.85%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #16994   +/-   ##
=======================================
  Coverage        ?   45.21%           
=======================================
  Files           ?      766           
  Lines           ?    86713           
  Branches        ?        0           
=======================================
  Hits            ?    39203           
  Misses          ?    41158           
  Partials        ?     6352           
Impacted Files Coverage Δ
services/auth/source/ldap/source_sync.go 37.83% <36.84%> (ø)
services/auth/source/ldap/source_search.go 47.21% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 976db2a...297f73b. Read the comment docs.

@zeripath zeripath merged commit db6b7db into go-gitea:main Sep 15, 2021
@zeripath zeripath deleted the improve-synchronize-efficiency branch September 15, 2021 09:28
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. performance/speed performance issues with slow downs type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants