[wp-trac] [WordPress Trac] #45804: Make WP_Hook gather callback performance information

WordPress Trac noreply at wordpress.org
Mon Sep 23 18:52:44 UTC 2019

#45804: Make WP_Hook gather callback performance information
 Reporter:  Rarst        |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Plugins      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  performance

Comment (by schlessera):

 Would maybe make more sense to store a single added entry that sums
         'function'      => ...,
         'accepted_args' => ...,
         'profiling'     => [
                 'hits'           => ...,
                 'total_duration' => ...,
                 'fastest'        => ...,
                 'slowest'        => ...,

 Otherwise, hooks like `'gettext'` on their own will already take down

 I know that the exact times would be more interesting to you for display
 purposes, but I think that type of granularity is just not feasible
 without a dedicated profiling run. It would maybe work on very barebones
 sites, but on the complex sites where you would actually need the
 profiling, it would just run out of memory or hit the timeout.

Ticket URL: <https://core.trac.wordpress.org/ticket/45804#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list