[wp-trac] [WordPress Trac] #44792: Add filter to get_post_class to solve get_taxonomies performance issues

WordPress Trac noreply at wordpress.org
Tue Aug 14 14:04:40 UTC 2018


#44792: Add filter to get_post_class to solve get_taxonomies performance issues
--------------------------+-----------------------------
 Reporter:  steveo2000    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.9.8
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 We have uncovered while running WooCommerce dashboard (but could also
 effect anything using WP_Posts_List_Table) that on a post type with 20
 posts per page this calls get_post_class() 20 times, which in turn queries
 all public taxonomies by get_taxonomies() 20 times.

 If you have lots of taxonomies this causes huge slow downs when accessing
 the page.

 A 20 product per page WooCommerce site loaded in 20 seconds, if I remove
 the get_taxonomies call it reduces it by 50%. Can you add a filter to this
 so we can stop this depending on the page you are on? - in my case if I am
 on the product listings page in the dashboard I need to restrict this
 occurring to reduce the load times.

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


More information about the wp-trac mailing list