perf: Don't fetch all the trash items when deleting a single item#61906
perf: Don't fetch all the trash items when deleting a single item#61906CarlSchwan wants to merge 6 commits into
Conversation
ffe88e1 to
f871721
Compare
provokateurin
left a comment
There was a problem hiding this comment.
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.
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>
5a2b87e to
96013b8
Compare
Done :) |
| #[\Override] | ||
| public function getTrashRootItem(IUser $user, string $name): ?ITrashItem { | ||
| foreach ($this->getBackends() as $backend) { | ||
| if (method_exists($backend, 'getTrashRootItem')) { |
There was a problem hiding this comment.
Since we force all implementations to add this method, this check is not really needed. If the implementation doesn't have the function yet, it will hard fail before this code is even reached.
There was a problem hiding this comment.
The getTrashRootItem is not yet in the interface so that this is easy to backport. I would add it to the interface and remove the method_exists check as a followup
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>
96013b8 to
acb2934
Compare
Summary
TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)