[buddypress-trac] [BuddyPress] #3758: Many database queries repeated when using bp_core_fetch_avatar to get group avatars
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Sun Nov 20 14:08:33 UTC 2011
#3758: Many database queries repeated when using bp_core_fetch_avatar to get group
avatars
----------------------------+-----------------------------
Reporter: arpit.tambi.in | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Core | Version:
Severity: normal | Keywords:
----------------------------+-----------------------------
I discovered this issue when I tried to run this to get group avatar for
each topic - bp_the_topic_object_avatar()
This function in turn calls bp_core_fetch_avatar to grab group avatars
This function alone resulted in 60 extra database queries just to fetch
alt text for each group. In fact many exact same queries are being
repeated.
In function bp_core_fetch_avatar this is the part that's creating
redundant queries.
{{{
elseif ( 'group' == $object )
$item_name = bp_get_group_name( new BP_Groups_Group(
$item_id ) );
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3758>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list