[wp-trac] [WordPress Trac] #36697: Combining the HTTP requests for obtaining the available nav menu items into a single request

WordPress Trac noreply at wordpress.org
Mon Sep 12 04:32:22 UTC 2016


#36697: Combining the HTTP requests for obtaining the available nav menu items into
a single request
--------------------------------------------------+------------------
 Reporter:  nguyencongtuan                        |       Owner:
     Type:  defect (bug)                          |      Status:  new
 Priority:  normal                                |   Milestone:  4.7
Component:  Customize                             |     Version:  4.5
 Severity:  normal                                |  Resolution:
 Keywords:  has-patch needs-testing dev-feedback  |     Focuses:
--------------------------------------------------+------------------

Comment (by westonruter):

 I was just thinking about this some more today and I realized that I don't
 really understand why all of the available items need to be loaded up-
 front to being with. For one thing, the available items requests are being
 made when the menus panel is opened, but these could be wasted requests
 because they'll never be displayed if the user never opens the panel to
 chose from available nav menu items.

 Secondly, then the user goes to “Add Items” the panel that opens shows all
 of the available item types in _collapsed_ accordions. None of the items
 are displayed there either. Would it not be much more efficient to just
 make the Ajax request to fetch the items of a given type when the
 accordion section is expanded? The spinner can be shown there initially to
 show that work is being done.

 @celloexpressions thoughts?

 (Another thought: If we do go ahead and combine all available nav menu
 items into a single request, there is a slight chance that there could be
 a server timeout if there are many custom post types and taxonomies. That
 being said, it's less likely to be problematic compared to hitting the
 server with X as many HTTP requests.)

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


More information about the wp-trac mailing list