[buddypress-trac] [BuddyPress Trac] #8688: BP_Groups_Group::get_total_member_count() is highly inefficient, and runs out of memory
buddypress-trac
noreply at wordpress.org
Mon May 9 19:55:13 UTC 2022
#8688: BP_Groups_Group::get_total_member_count() is highly inefficient, and runs
out of memory
--------------------------+---------------------
Reporter: dd32 | Owner: (none)
Type: defect (bug) | Status: new
Priority: high | Milestone: 10.3.0
Component: Groups | Version: 10.0.0
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+---------------------
Comment (by imath):
Thanks for your feedback @dd32 👍.
I've applied most of your suggestions except for the post-defer part. If
on the front end we could use `bp_get_current_group_id()` to guess the
group id, the only place where we are using it: WP Admin Group Screen we
are not setting the `$bp->current_group`'s global.
I think only doing a count if the Group ID is provided, leaves the ability
to developers wishing to update the members count for multiple groups to
only use `bp_groups_defer_group_members_count( false )` then use a custom
groups loop to update their counts.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8688#comment:16>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list