From f12839ffd41498ec43d6d60352f4c4e5c3129f0f Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Mon, 13 Apr 2015 12:43:40 -0700 Subject: [PATCH] Conpherenece - improve performance by not fetching data as often from D12347 Summary: Turns out the pertinent views don't use this data anyway. Additonally, change the remaining pathway to fetch 15% of the rows it fetched in D12347. Fixes T7815. Test Plan: clicked around and things worked. my instance always feels snappy though Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7815 Differential Revision: https://secure.phabricator.com/D12399 --- .../controller/ConpherenceColumnViewController.php | 1 - .../conpherence/controller/ConpherenceListController.php | 1 - .../controller/ConpherenceNotificationPanelController.php | 1 + .../conpherence/controller/ConpherenceUpdateController.php | 4 ++-- .../conpherence/query/ConpherenceThreadSearchEngine.php | 1 - 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/applications/conpherence/controller/ConpherenceColumnViewController.php b/src/applications/conpherence/controller/ConpherenceColumnViewController.php index a6ee236d5f..f6bac7aa91 100644 --- a/src/applications/conpherence/controller/ConpherenceColumnViewController.php +++ b/src/applications/conpherence/controller/ConpherenceColumnViewController.php @@ -16,7 +16,6 @@ final class ConpherenceColumnViewController extends $latest_conpherences = id(new ConpherenceThreadQuery()) ->setViewer($user) ->withPHIDs($conpherence_phids) - ->needTransactions(true) ->needParticipantCache(true) ->execute(); $latest_conpherences = mpull($latest_conpherences, null, 'getPHID'); diff --git a/src/applications/conpherence/controller/ConpherenceListController.php b/src/applications/conpherence/controller/ConpherenceListController.php index 2045dfcf71..0921ff59cd 100644 --- a/src/applications/conpherence/controller/ConpherenceListController.php +++ b/src/applications/conpherence/controller/ConpherenceListController.php @@ -138,7 +138,6 @@ final class ConpherenceListController extends ConpherenceController { $conpherences = id(new ConpherenceThreadQuery()) ->setViewer($user) ->withPHIDs($conpherence_phids) - ->needTransactions(true) ->needParticipantCache(true) ->execute(); diff --git a/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php b/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php index e101da5f42..e87225c299 100644 --- a/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php +++ b/src/applications/conpherence/controller/ConpherenceNotificationPanelController.php @@ -18,6 +18,7 @@ final class ConpherenceNotificationPanelController ->setViewer($user) ->withPHIDs(array_keys($participant_data)) ->needTransactions(true) + ->setTransactionLimit(3 * 5) ->needParticipantCache(true) ->execute(); } diff --git a/src/applications/conpherence/controller/ConpherenceUpdateController.php b/src/applications/conpherence/controller/ConpherenceUpdateController.php index e60d7e0124..2258bc4882 100644 --- a/src/applications/conpherence/controller/ConpherenceUpdateController.php +++ b/src/applications/conpherence/controller/ConpherenceUpdateController.php @@ -380,14 +380,14 @@ final class ConpherenceUpdateController $need_widget_data = false; $need_transactions = false; $need_participant_cache = true; - $need_transactions = true; switch ($action) { case ConpherenceUpdateActions::METADATA: - break; case ConpherenceUpdateActions::LOAD: + $need_transactions = true; break; case ConpherenceUpdateActions::MESSAGE: case ConpherenceUpdateActions::ADD_PERSON: + $need_transactions = true; $need_widget_data = true; break; case ConpherenceUpdateActions::REMOVE_PERSON: diff --git a/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php b/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php index a5cb4c6f73..636504639e 100644 --- a/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php +++ b/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php @@ -27,7 +27,6 @@ final class ConpherenceThreadSearchEngine public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) { $query = id(new ConpherenceThreadQuery()) - ->needTransactions(true) ->needParticipantCache(true); $participant_phids = $saved->getParameter('participantPHIDs', array()); -- 2.51.2