[buddypress-trac] [BuddyPress Trac] #3807: groups_get_group() and BP_Groups_Group tuning

buddypress-trac noreply at wordpress.org
Tue Sep 6 03:37:48 UTC 2016


#3807: groups_get_group() and BP_Groups_Group tuning
--------------------------+-----------------------------
 Reporter:  boonebgorges  |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Groups        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |
--------------------------+-----------------------------
Changes (by boonebgorges):

 * keywords:   => needs-patch


Comment:

 Yes, a parameter to exclude just these options would be a start.

 A more complete solution, IMO, would be to do the following:

 1. Ensure that the admin/mods query is properly cached.
 2. Lazy-load the admin/mods data. That is: make the properties protected,
 limiting access to `__get()`; and in `__get()`, fetch them only if they're
 needed. In the case of a groups loop, I'd say that they should all be pre-
 fetched into the cache no matter what (unless we want some sort of more
 sophisticated lazyload like WP does:
 https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp-
 metadata-lazyloader.php). But the more simple lazy-load would be quite
 effective when calling `groups_get_group()` outside of a loop.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3807#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list