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
parent 84a8b7e50e
commit 0fee41df7c
No known key found for this signature in database
GPG key ID: 02325448204E452A
2 changed files with 6 additions and 1142 deletions

View file

@ -46,6 +46,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,
@ -1070,7 +1073,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