Skip to content

Conversation

@CarlSchwan
Copy link
Member

@CarlSchwan CarlSchwan commented Jan 28, 2026

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

image

TODO

  • ...

Checklist

@CarlSchwan CarlSchwan added this to the Nextcloud 34 milestone Jan 28, 2026
@CarlSchwan CarlSchwan self-assigned this Jan 28, 2026
@CarlSchwan CarlSchwan requested a review from a team as a code owner January 28, 2026 22:56
@CarlSchwan CarlSchwan requested review from ArtificialOwl, come-nc, leftybournes and sorbaugh and removed request for a team January 28, 2026 22:56
@CarlSchwan CarlSchwan force-pushed the carl/getDirectoryContent-mimetypefilter branch 2 times, most recently from 2179cf1 to 5fe15da Compare January 29, 2026 10:04
@CarlSchwan CarlSchwan force-pushed the carl/getDirectoryContent-mimetypefilter branch from 5fe15da to c3eba5b Compare January 29, 2026 10:13
@CarlSchwan CarlSchwan force-pushed the carl/getDirectoryContent-mimetypefilter branch 2 times, most recently from b554ad8 to ec2a77e Compare January 29, 2026 10:45
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;
}
});
}
Copy link
Member

Choose a reason for hiding this comment

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

Is this even needed anymore?

Copy link
Member Author

Choose a reason for hiding this comment

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

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

@CarlSchwan CarlSchwan force-pushed the carl/getDirectoryContent-mimetypefilter branch from ec2a77e to e963419 Compare January 29, 2026 11:22
@CarlSchwan CarlSchwan force-pushed the carl/getDirectoryContent-mimetypefilter branch from e963419 to b8a657b Compare January 29, 2026 11:58
@CarlSchwan CarlSchwan force-pushed the carl/getDirectoryContent-mimetypefilter branch from b8a657b to e01e2ec Compare January 29, 2026 13:10
Signed-off-by: Carl Schwan <carlschwan@kde.org>
@CarlSchwan CarlSchwan force-pushed the carl/getDirectoryContent-mimetypefilter branch from e01e2ec to 084ef83 Compare January 29, 2026 13:44
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

Sorry I found some more 🙈

Signed-off-by: Carl Schwan <carlschwan@kde.org>
@CarlSchwan CarlSchwan force-pushed the carl/getDirectoryContent-mimetypefilter branch from ab02e3f to ce34d55 Compare January 29, 2026 15:43
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

Sorry that it took so many rounds 😅

@CarlSchwan
Copy link
Member Author

Sorry that it took so many rounds 😅

Thanks for the quality review :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants