-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
perf(dav): Preload dav search with tags/favorites #52981
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
Conversation
6a3b135 to
9f14ef9
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.
I think tags should be fetched with the search query. At least we have equipQueryForSystemTags that should take care of it. Maybe we can either improve the request, or the logic to "equip" the query for system tags.
server/lib/private/Files/Cache/QuerySearchHelper.php
Lines 156 to 161 in 8bda2dc
| if (in_array('systemtag', $requestedFields)) { | |
| $this->equipQueryForSystemTags($query, $this->requireUser($searchQuery)); | |
| } | |
| if (in_array('tagname', $requestedFields) || in_array('favorite', $requestedFields)) { | |
| $this->equipQueryForDavTags($query, $this->requireUser($searchQuery)); | |
| } |
What are the requested properties of the request?
It is not about filtering for favorites but the search query asking for the In the end this is hitting the regular PROPFIND plugins that extend the response through https://github.com/nextcloud/3rdparty/blob/ccc26ff9d787acddeb6a63c614317d19cb453c39/icewind/searchdav/src/DAV/SearchHandler.php#L88 |
artonge
left a comment
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.
Minor nitpicks, but looks good
fbdd455 to
43e45ae
Compare
Signed-off-by: Julius Knorr <jus@bitgrid.net>
43e45ae to
82e2994
Compare
|
/backport to stable31 |
|
/backport to stable30 |
|
/backport to stable29 |
Save one query per file for aggregating tags/favorites on SEARCH requests by using the existing reload logic from propFinds.
This also introduces an event so it may be useful in other plugins in the future
https://blackfire.io/profiles/compare/1605ef6c-6a3d-4a77-aecd-69331df2b476/graph