diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-04-21 04:44:29 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-04-21 04:44:29 +0400 |
commit | 3069828eff80e45a5f9ce661729adcebbb70fa6c (patch) | |
tree | 3df0a7d76868b704bb370e07cfb48af10fb4db7b /plugins/API | |
parent | ea240af531caeb85a9fec84c05b2714216175156 (diff) |
Refs #3906
* Speeding up the suggestion list by only selecting visitors that have a value set for the requested segment
Diffstat (limited to 'plugins/API')
-rw-r--r-- | plugins/API/API.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/API/API.php b/plugins/API/API.php index 6eac5c7f1b..db6a1e2070 100644 --- a/plugins/API/API.php +++ b/plugins/API/API.php @@ -1663,15 +1663,17 @@ class Piwik_API_API &date=$startDate,today &format=original &serialize=0 - &flat=1 - &segment="; + &flat=1"; + + // Select non empty fields only + $requestLastVisits.= "&segment=$segmentName" . Piwik_SegmentExpression::MATCH_IS_NOT_NULL . "null"; // By default Live fetches all actions for all visitors, but we'd rather do this only when required if(!$doesSegmentNeedActionsInfo) { $requestLastVisits .= "&doNotFetchActions=1"; - $requestLastVisits .= "&filter_limit=10000"; - } else { $requestLastVisits .= "&filter_limit=1000"; + } else { + $requestLastVisits .= "&filter_limit=500"; } $request = new Piwik_API_Request($requestLastVisits); |