[wp-trac] [WordPress Trac] #58290: Save a few processing cycles in `WP_Hook`

WordPress Trac noreply at wordpress.org
Wed May 10 18:07:03 UTC 2023


#58290: Save a few processing cycles in `WP_Hook`
-------------------------+-----------------------------
 Reporter:  bor0         |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:  trunk
 Severity:  normal       |   Keywords:  has-patch
  Focuses:               |
-------------------------+-----------------------------
 I found two low-hanging fruits that could improve the performance of
 hooks:

 1. Use `count` only when really needed (sometimes it may not be needed)
 2. `is_object` is redundant in `is_object( $x ) && $x instance of X`

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58290>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list