Skip to content

Commit 1453e8c

Browse files
authored
Merge pull request #135 from kdambekalns/nezaniel-free-memory
TASK: Free memory during indexing after each dimension combination This prevents memory being flooded with all node / dimension combinations data during indexing by clearing caches when a dimension combination was completely indexed.
2 parents 510c025 + 0c4fa23 commit 1453e8c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Service/IndexWorkspaceTrait.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ protected function indexWorkspaceWithDimensions($workspaceName, array $dimension
8484

8585
$traverseNodes($rootNode, $indexedNodes);
8686

87+
$this->nodeFactory->reset();
88+
$context->getFirstLevelNodeCache()->flush();
89+
8790
if ($callback !== null) {
8891
$callback($workspaceName, $indexedNodes, $dimensions);
8992
}

0 commit comments

Comments
 (0)