[wp-trac] [WordPress Trac] #17031: Saving navigation menu items is slow

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 18 14:38:22 UTC 2012


#17031: Saving navigation menu items is slow
--------------------------+------------------------------
 Reporter:  pellaeon      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Menus         |     Version:  3.1
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |
--------------------------+------------------------------
Changes (by ruud@…):

 * cc: ruud@… (added)


Comment:

 Hi, I have the same problem as well. Once a custom menu gets over a
 certain size.. no more saving, just application 500 server errors. In my
 case it takes approx 1 minute to get to this point. As a work-around I'm
 currently trying a max_connections of 300 in the MySQL settings.
 Hope this gets fixed soon.
 Another work-around I've made to circumvent this is to make separate
 menu's and then include them into each other via a 'relation' via the xfn
 tag... (this off-course is totally insane, but it works) like this (in an
 extended Walker_Nav_Menu class:


 {{{
    ....
    $output .= apply_filters( 'walker_nav_menu_start_el', $item_output,
 $item, $depth, $args );
    if ( !empty( $item->xfn ) ) {
         $submenu = wp_nav_menu( array(
                 'echo' => 0,
                 'fallback_cb' => '',
                 'theme_location' => $item->xfn,
                 'menu_class' => 'sub-menu',
                 'container' => false )
         );
         $output .= $submenu;
    }
 ....
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17031#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list