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

limit constructing of result objects in file search #26049

Merged
merged 2 commits into from
Mar 12, 2021

Conversation

icewind1991
Copy link
Member

even thought we currently have no proper way of limiting the search itself, we can at least limit the construction of the result objects.

this saves about 40% of the time spend in the search request in my local testing when the search query matches a large number of files.

Signed-off-by: Robin Appelman robin@icewind.nl

@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Mar 10, 2021
@icewind1991 icewind1991 added this to the Nextcloud 22 milestone Mar 10, 2021
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

psalm is not happy

@icewind1991
Copy link
Member Author

psalm is not happy

Looks happy enough to me?

even thought we currently have no proper way of limiting the search itself, we can at least limit the construction of the result objects.

this saves about 40% of the time spend in the search request in my local testing

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991
Copy link
Member Author

extended it to also work for the old search endpoint (mainly for backport reasons)

Signed-off-by: Robin Appelman <robin@icewind.nl>
@rullzer rullzer merged commit bf39adb into master Mar 12, 2021
@rullzer rullzer deleted the search-file-limit-results branch March 12, 2021 11:58
@icewind1991
Copy link
Member Author

/backport to stable21

@icewind1991
Copy link
Member Author

/backport to stable20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants