[buddypress-trac] [BuddyPress Trac] #6866: `bp_activity_get_post_types_tracking_args()` is called too frequently

buddypress-trac noreply at wordpress.org
Tue Feb 2 03:59:37 UTC 2016

#6866: `bp_activity_get_post_types_tracking_args()` is called too frequently
 Reporter:  boonebgorges          |       Owner:
     Type:  defect (bug)          |      Status:  new
 Priority:  normal                |   Milestone:  Awaiting Review
Component:  Component - Activity  |     Version:
 Severity:  normal                |  Resolution:
 Keywords:                        |

Comment (by boonebgorges):

 [attachment:6866.diff] is one possible way of streamlining things: only
 allow post type tracking args to be set up one time, stashing the
 processed results in a static. In my testing, this dramatically increases
 performance. However, there are a couple of potential problems:

 a. It's possible that someone may be using a targeted filter to modify
 'bp_activity_get_post_types_tracking_args' at different points in the
 pageload, so that a callback applied late in the pageload would not be
 appropriate the first time the function is called.
 b. Post types may not register themselves in time for the first call to
 `bp_activity_get_post_types_tracking_args()`, and as a result, would not
 be included in the static data.

 @imath Pinging you for any thoughts :-D

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6866#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list