[wp-trac] [WordPress Trac] #50679: Optimization for wp_get_attachment_metadata()

WordPress Trac noreply at wordpress.org
Thu Jul 16 12:52:02 UTC 2020


#50679: Optimization for wp_get_attachment_metadata()
-------------------------+------------------------------
 Reporter:  Tkama        |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Media        |     Version:  5.4.2
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  performance
-------------------------+------------------------------
Changes (by SergeyBiryukov):

 * focuses:   => performance


Comment:

 Hi there, thanks for the ticket!

 This acts as a quick check to verify that the post actually exists before
 proceeding further to `get_metadata()`, `update_meta_cache()`, etc.

 Some performance benchmarks for various cases (existing attachment ID,
 non-existing ID, invalid ID) would be helpful here to show if removing
 that code makes any difference.

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


More information about the wp-trac mailing list