perf: Test chunking with a lower amount of entries

Use a lower array_chunk values when running the code in the tests for
the comment manager.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
This commit is contained in:
Carl Schwan 2026-06-10 11:42:55 +02:00 committed by backportbot[bot]
parent 33f30d1086
commit 8a270ee825
2 changed files with 6 additions and 1142 deletions

View file

@ -45,6 +45,9 @@ class Manager implements ICommentsManager {
/** @var \Closure[] */
protected array $displayNameResolvers = [];
// Modified by tests
protected int $chunkSize = 500;
public function __construct(
protected IDBConnection $dbConn,
protected LoggerInterface $logger,
@ -1071,7 +1074,7 @@ class Manager implements ICommentsManager {
return [];
}
$chunks = array_chunk($commentIds, 500);
$chunks = array_chunk($commentIds, $this->chunkSize);
$query = $this->dbConn->getQueryBuilder();
$query->select('*')

File diff suppressed because it is too large Load diff