From 93f35d9f45dbc0285e3c27c0955cfd4041f5aa18 Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Wed, 9 Dec 2020 09:22:36 +1300 Subject: More efficient page performance request processor (#16913) fix https://github.com/matomo-org/matomo/issues/16912 --- .../PagePerformance/Tracker/PerformanceDataProcessor.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/PagePerformance') diff --git a/plugins/PagePerformance/Tracker/PerformanceDataProcessor.php b/plugins/PagePerformance/Tracker/PerformanceDataProcessor.php index 54471db6ea..f3877a3a92 100644 --- a/plugins/PagePerformance/Tracker/PerformanceDataProcessor.php +++ b/plugins/PagePerformance/Tracker/PerformanceDataProcessor.php @@ -47,13 +47,6 @@ class PerformanceDataProcessor extends RequestProcessor return; } - $idLinkVa = $this->getPageViewId($idVisit, $pageViewId); - - // ignore requests - if (empty($idLinkVa)) { - return; - } - /** @var ActionDimension[] $performanceDimensions */ $performanceDimensions = [ new TimeNetwork(), @@ -77,6 +70,13 @@ class PerformanceDataProcessor extends RequestProcessor return; // no values to update given with the request } + $idLinkVa = $this->getPageViewId($idVisit, $pageViewId); + + // ignore requests + if (empty($idLinkVa)) { + return; + } + Log::info('Updating page performance metrics of page view with id ' . $pageViewId); $model = new Model(); -- cgit v1.2.3