Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 2.0
-
Fix Version/s: 2.0
-
Component/s: None
-
Labels:None
Description
In CRM_Contact_BAO_GroupNesting::hasParentGroups(), we look for the parent groups of $groupId.
With many groups, this produces a huge number of queries against the table civicrm_group_nesting. The sample logfile attached shows 2591 lines of logfile (>1200 queries perhaps).
For nested sets like this, it might be more efficient to load the entire contents of that table at once and store it in memory, rather than repeating the query many times.