Skip to content

perf: Don't fetch all the trash items when deleting a single item#61906

Merged
CarlSchwan merged 6 commits into
masterfrom
carl/trashitem-delete-optimization
Jul 16, 2026
Merged

perf: Don't fetch all the trash items when deleting a single item#61906
CarlSchwan merged 6 commits into
masterfrom
carl/trashitem-delete-optimization

Conversation

@CarlSchwan

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@CarlSchwan CarlSchwan self-assigned this Jul 8, 2026
@CarlSchwan
CarlSchwan force-pushed the carl/trashitem-delete-optimization branch from ffe88e1 to f871721 Compare July 9, 2026 08:19
@CarlSchwan
CarlSchwan marked this pull request as ready for review July 9, 2026 08:19
@CarlSchwan
CarlSchwan requested a review from a team as a code owner July 9, 2026 08:19
@CarlSchwan
CarlSchwan requested review from ArtificialOwl, icewind1991, leftybournes and provokateurin and removed request for a team July 9, 2026 08:19
@CarlSchwan CarlSchwan added this to the Nextcloud 35 milestone Jul 9, 2026

@provokateurin provokateurin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd prefer the reverse commit order, where you first move the code from getTrashFiles into a separate method and then use it instead of duplicating it first and then removing it.

Comment thread apps/files_trashbin/lib/Sabre/TrashRoot.php Outdated
Comment thread apps/files_trashbin/lib/Trash/LegacyTrashBackend.php Outdated
@CarlSchwan
CarlSchwan force-pushed the carl/trashitem-delete-optimization branch from 5a2b87e to 96013b8 Compare July 9, 2026 09:11
@CarlSchwan

Copy link
Copy Markdown
Member Author

I'd prefer the reverse commit order, where you first move the code from getTrashFiles into a separate method and then use it instead of duplicating it first and then removing it.

Done :)

@provokateurin provokateurin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very nice!

Comment thread apps/files_trashbin/lib/Trash/TrashManager.php
@CarlSchwan
CarlSchwan force-pushed the carl/trashitem-delete-optimization branch from 96013b8 to acb2934 Compare July 9, 2026 10:40
Signed-off-by: Carl Schwan <carlschwan@kde.org>
Signed-off-by: Carl Schwan <carlschwan@kde.org>
Signed-off-by: Carl Schwan <carlschwan@kde.org>
Signed-off-by: Carl Schwan <carlschwan@kde.org>
Only take one argument and instead call this with array map

Signed-off-by: Carl Schwan <carlschwan@kde.org>
Signed-off-by: Carl Schwan <carlschwan@kde.org>
@AndyScherzinger
AndyScherzinger force-pushed the carl/trashitem-delete-optimization branch from acb2934 to b5dd899 Compare July 15, 2026 22:28
@CarlSchwan
CarlSchwan merged commit c79fe01 into master Jul 16, 2026
274 of 283 checks passed
@CarlSchwan
CarlSchwan deleted the carl/trashitem-delete-optimization branch July 16, 2026 04:14
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