The Wayback Machine - https://web.archive.org/web/20230113220321/https://github.com/go-gitea/gitea/pull/16994
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 [email protected]

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

Signed-off-by: Andrew Thornton <[email protected]>
@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.

6543
6543 approved these changes Sep 10, 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
2 checks passed
@zeripath zeripath deleted the improve-synchronize-efficiency branch Sep 15, 2021
@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
kind/bug lgtm/done performance/speed performance issues with slow downs
Development

Successfully merging this pull request may close these issues.

None yet

5 participants