perf: Allow filtering the directory content by mimetype#57891
Open
CarlSchwan wants to merge 2 commits intomasterfrom
Open
perf: Allow filtering the directory content by mimetype#57891CarlSchwan wants to merge 2 commits intomasterfrom
CarlSchwan wants to merge 2 commits intomasterfrom
Conversation
2179cf1 to
5fe15da
Compare
5fe15da to
c3eba5b
Compare
b554ad8 to
ec2a77e
Compare
Comment on lines
1634
to
1648
|
|
||
| if ($mimetype_filter) { | ||
| $files = array_filter($files, function (FileInfo $file) use ($mimetype_filter) { | ||
| if (strpos($mimetype_filter, '/')) { | ||
| return $file->getMimetype() === $mimetype_filter; | ||
| if ($mimeTypeFilter) { | ||
| $files = array_filter($files, function (FileInfo $file) use ($mimeTypeFilter) { | ||
| if (strpos($mimeTypeFilter, '/')) { | ||
| return $file->getMimetype() === $mimeTypeFilter; | ||
| } else { | ||
| return $file->getMimePart() === $mimetype_filter; | ||
| return $file->getMimePart() === $mimeTypeFilter; | ||
| } | ||
| }); | ||
| } |
Member
There was a problem hiding this comment.
Is this even needed anymore?
Member
Author
There was a problem hiding this comment.
actually still needed to filters the mounts added later on in this method. I need to see what makes more sense, filter the mounts in MountManager::findIn or afterward
ec2a77e to
e963419
Compare
e963419 to
b8a657b
Compare
provokateurin
requested changes
Jan 29, 2026
b8a657b to
e01e2ec
Compare
Signed-off-by: Carl Schwan <carlschwan@kde.org>
e01e2ec to
084ef83
Compare
provokateurin
requested changes
Jan 29, 2026
Member
provokateurin
left a comment
There was a problem hiding this comment.
Sorry I found some more 🙈
4 tasks
ab02e3f to
ce34d55
Compare
provokateurin
approved these changes
Jan 29, 2026
Member
provokateurin
left a comment
There was a problem hiding this comment.
Sorry that it took so many rounds 😅
Member
Author
Thanks for the quality review :) |
ce34d55 to
41d052e
Compare
cristianscheid
approved these changes
Feb 4, 2026
Signed-off-by: Carl Schwan <carlschwan@kde.org>
41d052e to
3d5316b
Compare
This file contains hidden or 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
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.
Summary
Likely too late for 33
Optimize a bit the /ocs/v2.php/apps/files/api/v1/folder-tree as it means we have less entry to fetch which takes around 30s to execute on prod
TODO
Checklist
3. to review, feature component)stable32)