mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
Merge pull request #41272 from nextcloud/fixOccScans
fix: reduce memory consumption of scans
This commit is contained in:
commit
394cd75322
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