[wp-trac] [WordPress Trac] #58309: Save a few processing cycles by removing redundant is_object

WordPress Trac noreply at wordpress.org
Sun May 14 18:09:21 UTC 2023


#58309: Save a few processing cycles by removing redundant is_object
-------------------------+------------------------------
 Reporter:  Presskopp    |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  performance
-------------------------+------------------------------

Comment (by costdev):

 Thanks for the patch @Presskopp!

 While we're here, we could make `$image instanceof GdImage` the first
 condition. So there'll only be one unnecessary check for a resource of
 `'gd'`, rather than two unnecessary checks for an object of `GdImage`.

 What do you think?

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


More information about the wp-trac mailing list