[wp-trac] [WordPress Trac] #42566: When I use wp_nav_menu I get a huge update_meta_cache query regardless of theme

WordPress Trac noreply at wordpress.org
Tue Nov 21 13:43:09 UTC 2017


#42566: When I use wp_nav_menu I get a huge update_meta_cache query regardless of
theme
--------------------------+----------------------
 Reporter:  andyseaton83  |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Menus         |     Version:  4.8.3
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------
Changes (by welcher):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 @andyseaton83 thanks for the ticket and welcome to trac!

 Looking at the code, I can see that there are many places where caching is
 implemented to potentially mitigate large SQL queries. Do you have object
 caching in place such as Memcached? If your queries are retrieving 20k+
 records to render a menu, I would highly recommend implementing caching as
 it will bypass any cached id's and not pass them to the query in question
 [https://github.com/WordPress/wordpress-develop/blob/master/src/wp-
 includes/meta.php#L808-L825 See the source here]

 At any rate, I'm not sure that this is an issue with core itself and this
 may be better suited as a support question on forums such as
 https://wordpress.org/support/ or https://wordpress.stackexchange.com/

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


More information about the wp-trac mailing list