From dc2d18d7192dd70ed54ccba69ea10415c612246e Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Tue, 28 Jan 2014 20:25:21 +0000 Subject: should use less memory when aggregating data table records --- core/ArchiveProcessor.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/ArchiveProcessor.php') diff --git a/core/ArchiveProcessor.php b/core/ArchiveProcessor.php index a8eaaf7056..76b45f435f 100644 --- a/core/ArchiveProcessor.php +++ b/core/ArchiveProcessor.php @@ -199,6 +199,8 @@ class ArchiveProcessor } $nameToCount = array(); foreach ($recordNames as $recordName) { + $latestUsedTableId = Manager::getInstance()->getMostRecentTableId(); + $table = $this->aggregateDataTableRecord($recordName, $columnsAggregationOperation, $columnsToRenameAfterAggregation); $nameToCount[$recordName]['level0'] = $table->getRowsCount(); @@ -207,6 +209,9 @@ class ArchiveProcessor $blob = $table->getSerialized($maximumRowsInDataTableLevelZero, $maximumRowsInSubDataTable, $columnToSortByBeforeTruncation); Common::destroy($table); $this->insertBlobRecord($recordName, $blob); + + unset($blob); + DataTable\Manager::getInstance()->deleteAll($latestUsedTableId); } return $nameToCount; -- cgit v1.2.3