[wp-trac] [WordPress Trac] #31071: media / post_mime_type related queries are very slow on larger sites

WordPress Trac noreply at wordpress.org
Fri Apr 7 16:16:36 UTC 2017


#31071: media / post_mime_type related queries are very slow on larger sites
------------------------------------+--------------------------
 Reporter:  archon810               |       Owner:  pento
     Type:  defect (bug)            |      Status:  assigned
 Priority:  normal                  |   Milestone:  4.7.4
Component:  Media                   |     Version:  4.1
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  performance
------------------------------------+--------------------------
Changes (by jnylen0):

 * keywords:  has-patch fixed-major => has-patch dev-feedback


Comment:

 Per above review feedback and Slack discussion, I've attached a couple
 more patches.

 [attachment:31071.4.diff] is intended for the 4.7 branch and contains the
 following changes:

 - Make the filter names more specific.
 - Fix the inline documentation (use `@param` instead of `@return`).
 - Use `null ===` instead of `is_null` to avoid an extra function call.
 - Rename the `$has_audio` and `$has_video` variables now that they
 actually represent something slightly different.

 [attachment:31071.5.diff] is intended to fix this issue in the 4.8 branch
 by skipping these expensive queries by default and always showing the
 "Create Audio/Video Playlist" buttons.

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


More information about the wp-trac mailing list