[buddypress-trac] [BuddyPress Trac] #5629: Slow queries with BP_Activity_Activity::get()

buddypress-trac noreply at wordpress.org
Mon Jun 9 18:33:06 UTC 2014


#5629: Slow queries with BP_Activity_Activity::get()
-------------------------+---------------------------
 Reporter:  Clean-Cole   |       Owner:  boonebgorges
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  2.1
Component:  Activity     |     Version:  2.0
 Severity:  normal       |  Resolution:  fixed
 Keywords:  has-patch    |
-------------------------+---------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"8491"]:
 {{{
 #!CommitTicketReference repository="" revision="8491"
 Disable COUNT queries by default in bp_activity_get() stack

 The COUNT query performed to get the total activity count has proven to be
 a
 performance bottleneck on large sites. Moreover, the way that activity
 items
 are displayed on the front end (using the Load More link) means that the
 total
 count is not actually used by BuddyPress in most cases. To reduce query
 overhead, we introduce a 'count_total' parameter to the bp_activity_get()
 stack, and set it to false by default.

 For backward compatibility, a few additional changes are introduced:

 - In the activity-loop.php template, the <noscript> pagination markup is
   removed. In its place, the Load More link is refactored so that it loads
   the next available page of activity items.
 - The mechanism used to determine whether there are more activity items to
 show
   (bp_activity_has_more_items()) has been refined; when no COUNT query
 takes
   place, we query for the $per_page value + 1 to infer whether more items
 are
   available.

 Fixes #5629

 Props boonebgorges, r-a-y
 }}}

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


More information about the buddypress-trac mailing list