-
-
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
Optimize retrieving display name when searching for users in a group #32866
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CarlSchwan
force-pushed
the
performance/searchInGroup-displayname-cache
branch
from
June 13, 2022 17:01
473c0b2
to
e05dfe3
Compare
CarlSchwan
force-pushed
the
performance/searchInGroup-displayname-cache
branch
from
June 14, 2022 09:31
e05dfe3
to
e4e1cea
Compare
come-nc
reviewed
Jun 21, 2022
come-nc
reviewed
Jun 21, 2022
come-nc
reviewed
Jun 21, 2022
come-nc
reviewed
Jun 21, 2022
come-nc
reviewed
Jun 21, 2022
CarlSchwan
force-pushed
the
performance/searchInGroup-displayname-cache
branch
from
June 21, 2022 09:44
e4e1cea
to
1e78349
Compare
CarlSchwan
force-pushed
the
performance/searchInGroup-displayname-cache
branch
from
June 22, 2022 14:08
1e78349
to
c1986b5
Compare
come-nc
reviewed
Jun 23, 2022
CarlSchwan
force-pushed
the
performance/searchInGroup-displayname-cache
branch
from
June 23, 2022 17:52
c1986b5
to
b4f3295
Compare
icewind1991
requested changes
Aug 15, 2022
CarlSchwan
force-pushed
the
performance/searchInGroup-displayname-cache
branch
2 times, most recently
from
October 16, 2022 18:00
2714e80
to
9e67ff9
Compare
CarlSchwan
force-pushed
the
performance/searchInGroup-displayname-cache
branch
from
October 16, 2022 18:08
9e67ff9
to
0544e8c
Compare
come-nc
approved these changes
Oct 17, 2022
CarlSchwan
force-pushed
the
performance/searchInGroup-displayname-cache
branch
from
October 20, 2022 10:12
0544e8c
to
c586cdb
Compare
come-nc
force-pushed
the
performance/searchInGroup-displayname-cache
branch
3 times, most recently
from
December 22, 2022 11:22
2cc2e13
to
82759db
Compare
We should decide if the array returned by usersInGroup and searchInGroup is using the uid as key or integers. I would say usersInGroup need to use int for BC, but searchInGroup could use uid as it may be handy in some cases. |
come-nc
force-pushed
the
performance/searchInGroup-displayname-cache
branch
2 times, most recently
from
January 2, 2023 16:57
ed19592
to
8e2c487
Compare
This is ready for review I think. |
This is recurrent scenario that we are searching for users and then for each users we fetch the displayName. This is inefficient, so instead try to do one query to fetch everything (e.g. Database backend) or use the already existing DisplayNameCache helper. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Better for backward compatibility, also move new interfaces to nc 26 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
…ion from ABackend Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
usersInGroup index by int for BC, searchInGroup index by uid (string). Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
come-nc
force-pushed
the
performance/searchInGroup-displayname-cache
branch
from
April 27, 2023 10:05
8e2c487
to
346344c
Compare
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
icewind1991
approved these changes
May 1, 2023
Also went back to searchUsers indexing the array by uid as it was the previous behavior and the IGroup phpdoc does not say anything about the keys. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
come-nc
added
the
pending documentation
This pull request needs an associated documentation update
label
May 2, 2023
come-nc
removed
the
pending documentation
This pull request needs an associated documentation update
label
May 2, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a recurrent scenario where we are searching for users and then for
each user, we fetch the displayName. This is inefficient, so instead try
to do one query to fetch everything (e.g. Database backend) or use the
already existing DisplayNameCache helper.
Splitted from #32201