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
contactsmanager shall limit number of results early #22057
Conversation
/backport to stable19 |
7828a92
to
646820b
Compare
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
646820b
to
7c56283
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.
Code looks good and makes sense 👍
This comment has been minimized.
This comment has been minimized.
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.
🐘
/backport to stable18 |
The limit is passed down, but not the sort order. So the result correctness is only given if database sorts the same way as the PHP code does later on. Let's say you have 100 contacts. The database sorts them by UID. You select the first 20 rows, then sort the rows by name. It's not the same result as fetching all 100 contacts, sorting them and then taking the first 20 entries.
|
You have (still) too many results 😅 |
fixes #20009 cf. #20009 (comment)
Optional arguments are added to the ContactsStore API, so it should be okay to backport it to 19. Support for limiting results is implemented down the stack already. Since the contactsmenu reduces results according to
sharing.maxAutocompleteResults
and the search filter is passed to the backend, limiting the possible results up front does not sacrifice anything, but improves performance.