mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
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:
parent
84a8b7e50e
commit
0fee41df7c
2 changed files with 6 additions and 1142 deletions
|
|
@ -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
Loading…
Reference in a new issue