Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-20226 [NFC] add comment to warn coders about performance impact #11011

Merged
merged 1 commit into from
Sep 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CRM/Contact/BAO/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,13 @@ public static function getGroupList(&$params) {
}

// 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));
}

Expand Down