Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-03-10 08:09:04 +0300
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-03-10 08:09:04 +0300
commit63022a140a71561c9f7b2dc7dffa99cd3f5c63a2 (patch)
treeaaddda4f29c1ca792501c32a63e3b6fdbfc9749a /plugins/UserCountry
parent68917a01af65efb1a4a6482e5cc07149b3047a3c (diff)
- refs #374 Performance: Fix memory leak during Archiving process
refactoring and fixing architecture issue, which makes code more simple
Diffstat (limited to 'plugins/UserCountry')
-rw-r--r--plugins/UserCountry/UserCountry.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/UserCountry/UserCountry.php b/plugins/UserCountry/UserCountry.php
index 93a052ca1e..d408e08962 100644
--- a/plugins/UserCountry/UserCountry.php
+++ b/plugins/UserCountry/UserCountry.php
@@ -59,10 +59,8 @@ class Piwik_UserCountry extends Piwik_Plugin
);
$nameToCount = $archiveProcessing->archiveDataTable($dataTableToSum);
- $record = new Piwik_ArchiveProcessing_Record_Numeric(
- 'UserCountry_distinctCountries',
- $nameToCount['UserCountry_country']['level0']
- );
+ $archiveProcessing->insertNumericRecord('UserCountry_distinctCountries',
+ $nameToCount['UserCountry_country']['level0']);
}
function archiveDay($notification)
@@ -99,11 +97,11 @@ class Piwik_UserCountry extends Piwik_Plugin
protected function archiveDayRecordInDatabase($archiveProcessing)
{
$tableCountry = $archiveProcessing->getDataTableFromArray($this->interestByCountry);
- $record = new Piwik_ArchiveProcessing_Record_BlobArray('UserCountry_country', $tableCountry->getSerialized());
- $record = new Piwik_ArchiveProcessing_Record_Numeric('UserCountry_distinctCountries', $tableCountry->getRowsCount());
+ $archiveProcessing->insertBlobRecord('UserCountry_country', $tableCountry->getSerialized());
+ $archiveProcessing->insertNumericRecord('UserCountry_distinctCountries', $tableCountry->getRowsCount());
$tableContinent = $archiveProcessing->getDataTableFromArray($this->interestByContinent);
- $record = new Piwik_ArchiveProcessing_Record_BlobArray('UserCountry_continent', $tableContinent->getSerialized());
+ $archiveProcessing->insertBlobRecord('UserCountry_continent', $tableContinent->getSerialized());
}
}