perf(stack): Optimize fetching all cards from a stack

- Don't fetch stack, if we already know it
- fetch all comments at the same time, instead of for each card

Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
This commit is contained in:
Carl Schwan
2025-08-13 14:53:43 +02:00
parent 0ed8b21b3c
commit ce5faf05ab
2 changed files with 29 additions and 12 deletions

View File

@@ -82,7 +82,7 @@ class StackService {
return;
}
$stack->setCards($this->cardService->enrichCards($cards));
$stack->setCards($this->cardService->enrichCards($cards, $stack));
}
private function enrichStacksWithCards($stacks, $since = -1) {