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

buddypress-trac noreply at wordpress.org
Wed Feb 3 04:38:22 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):

 Depending on a very late hook doesn't seem safe. Conventionally, plugins
 register post types at 'init', but there's no reason they can't be
 registered at 'wp' or even later.

 It would be possible to run the filter only if we've detected that the
 dynamically-built `$post_types_tracking_arms` has changed since the last
 time the function was run. Since `apply_filters()` is what's introducing
 the overhead, this would probably help a lot. However, I don't really like
 the idea of running a filter intermittently - this kind of pattern is
 really hard for devs to debug and modify.

 Let's wait to see how the performance improvements suggested in #6864 and
 #6865 turn out. It's likely that they will offset most of what I'm
 suggesting here, and we can `wontfix` this ticket.

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


More information about the buddypress-trac mailing list