[wp-trac] [WordPress Trac] #16799: Bloated Custom Menus

WordPress Trac wp-trac at lists.automattic.com
Tue Mar 8 19:26:39 UTC 2011


#16799: Bloated Custom Menus
--------------------------+-----------------------------
 Reporter:  kingkool68    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 tl;dr = WordPress should limit the size of auto generated descriptions for
 menus. Ideally there should be no menu item descriptions.


 I'm working on a project that uses a lot of custom menus. So many custom
 menus in fact that editing them nearly brings my server to it's knees. (10
 menus x 70 items each maximum 2 levels deep)

 The biggest problem I found is WordPress loads a description with each
 menu item. I had to turn off JavaScript to even see this field and that's
 when I saw large blobs of content are being loaded with each and every
 menu items.

 When loading one menu Firebug clocked the HTML page weighing in at 2.3MB.
 I went to my database and ran the following SQL to remove the offending
 blurbs of bloated text...

 UPDATE `posts` SET `post_content` = '' WHERE `post_type` LIKE
 'nav_menu_item';

 This reduced the page weight by half to 1.1MB. The menu still took a bit
 to load but now I could save it back to the database successfully.

 Other work arounds to make custom menus usable included raising the max
 execution time for PHP on my server and increasing the $_POST and $_GET
 size limit.

 Custom menus need to go on diet.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16799>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list