Skip to:

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#3758 closed defect (bug) (duplicate)

Many database queries repeated when using bp_core_fetch_avatar to get group avatars

Reported by: arpittambiin's profile Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Core 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 ) );

Change History (3)

#1 @boonebgorges
12 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Thanks for the report. The root of the problem is that we don't have good (or any :) ) cache support for calling up groups in this fashion. I've opened a more general ticket for this issue #3770, and I'll close this one as a duplicate. Please follow along there. Thanks again for bringing this up.

#3 @johnjamesjacoby
12 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.