From 3525bc83aabfb7234730ed35eaae67df94155939 Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 21 Sep 2017 17:15:37 +1200 Subject: [PATCH] CRM-20226 [NFC] add comment to warn coders about performance impact --- CRM/Contact/BAO/Group.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CRM/Contact/BAO/Group.php b/CRM/Contact/BAO/Group.php index 6ebf3b8b96..3273fbee88 100644 --- a/CRM/Contact/BAO/Group.php +++ b/CRM/Contact/BAO/Group.php @@ -1017,6 +1017,13 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group { } // get group contact count using Contact.GetCount API + // CRM-20226 This has been added here in order to address a specific bug. However, a prior + // decision was to refresh group counts less aggressively, offering instead a button to + // refresh them to give users a better experience by loading pages quicker. + // For some sites this can be crazy slow even though only 25 sites resolve. Even for sites + // with relatively few smart groups it is not a good user experience. + // Adding comments here as I'm not going to tackle a fix this time around but want + // to warn people off making it worse. $values[$object->id]['count'] = civicrm_api3('Contact', 'getcount', array('group' => $object->id)); } -- 2.25.1