diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2014-01-29 00:25:21 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2014-01-29 00:25:21 +0400 |
commit | dc2d18d7192dd70ed54ccba69ea10415c612246e (patch) | |
tree | 8e2b437131e60029785b76b7b2511de67464bdf1 | |
parent | fb6775bfa355fac48b6a82a114d196437da8c69f (diff) |
should use less memory when aggregating data table records
-rw-r--r-- | core/ArchiveProcessor.php | 5 |
1 files changed, 5 insertions, 0 deletions
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; |