[wp-trac] [WordPress Trac] #25787: wp_page_menu function is very inefficient
WordPress Trac
noreply at wordpress.org
Fri Jan 16 22:14:39 UTC 2015
#25787: wp_page_menu function is very inefficient
-------------------------+-----------------------------
Reporter: whawker | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Menus | Version: 3.7.1
Severity: major | Resolution:
Keywords: needs-patch | Focuses: performance
-------------------------+-----------------------------
Comment (by MisdaX):
I tried to extend the core functions without breaking the current
functionality.
* wp_page_menu() has a new argument "optimize_query" which is delegated to
wp_list_pages()
* wp_list_pages() has a new argument "optimize_query" which defines a
minimum set of wp_posts columns (for get_pages()) to serve the function
(if true)
* get_pages() has a new argument "restrict_columns" which restricts the
number of of fetched columns from the database (if not empty)
Profiling with xdebug shows faster execution time and a dump of
memory_get_peak_usage() shows lower memory consumption on my installation.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/25787#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list