-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fix performance problem when searching for groups in the groupfolder app #32201
Conversation
121e074
to
b8a8de4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All nice, with the one downside that the search now happens on terms of the group backend. Group backends able to contain users of mixed user backends thus do not utilize the search methods of the user backends. For example, when normally you can find "Jeanne Doe" of LDAP by her employee number 123456, you cannot achieve the same when search for her in the local group. The sad thing of course is that the owning user backend does not know about this relationship, so searching there will would also be painfully slow (likely better than now, but still).
With that in mind, this approach may be acceptable with this known limitation (that should be documented somewhere). Additional the slower search can be offered still and enabled via config option – and as opt-in. Searching for display name* and email is the default case after all.
*also there might be different results
21fdf4c
to
0f3f112
Compare
According to the code, the search happens like this with this patch:
Before:
So to me, this seems equivalent just faster and cleaner, unless I obliviously missed something. Maybe we should do a call on Monday to discuss this if you have time? |
01190a9
to
f57e809
Compare
ping :) |
friendly ping :) |
f57e809
to
4a60577
Compare
/rebase |
4716930
to
32cabdd
Compare
Before we were fetching 1000 users and then filter them by name Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
32cabdd
to
6e00901
Compare
@blizzz I reverted the changes for the search and found out instead other areas where we could improve the perf by quite a bit:
In total, with 1100 LDAP groups, these changes reduce the SQL query count from 1125 to 13. The LDAP query count is still very high (>6000) but I have a PR in groupfolder to reduce it to 30. I'll try to split the change into multiple self-contained PRs to make it easier to review :) |
groupDetails method Signed-off-by: Carl Schwan <carl@carlschwan.eu>
6e00901
to
e1ce8ee
Compare
First split #32866 |
As there is no feedback since a while I will close this ticket. |
The scope of this PR ended up a bit bigger than initially thought.
This target NC 25, but we might do a partial backport to NC 24 and earlier (the optimization)