mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
fix: reduce memory consumption of scans
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> Fix lint Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
This commit is contained in:
parent
21042c3e0f
commit
d2da9c8fbe
1 changed files with 6 additions and 3 deletions
|
|
@ -606,9 +606,12 @@ class Cache implements ICache {
|
|||
}
|
||||
|
||||
/** @var ICacheEntry[] $childFolders */
|
||||
$childFolders = array_filter($children, function ($child) {
|
||||
return $child->getMimeType() == FileInfo::MIMETYPE_FOLDER;
|
||||
});
|
||||
$childFolders = [];
|
||||
foreach ($children as $child) {
|
||||
if ($child->getMimeType() == FileInfo::MIMETYPE_FOLDER) {
|
||||
$childFolders[] = $child;
|
||||
}
|
||||
}
|
||||
foreach ($childFolders as $folder) {
|
||||
$parentIds[] = $folder->getId();
|
||||
$queue[] = $folder->getId();
|
||||
|
|
|
|||
Loading…
Reference in a new issue