[wp-trac] [WordPress Trac] #15915: Verbose rewrite rules trigger a query for every page on options-permalink
WordPress Trac
wp-trac at lists.automattic.com
Mon Dec 20 16:07:08 UTC 2010
#15915: Verbose rewrite rules trigger a query for every page on options-permalink
---------------------------+------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.1
Component: Rewrite Rules | Version:
Severity: normal | Resolution:
Keywords: |
---------------------------+------------------
Comment (by nacin):
A single call to get_pages() as a way to put the queried pages in cache,
in WP_Rewrite::page_uri_index(), should reduce these. Otherwise we're
calling get_page() when we call get_page_uri().
We're also doing a query for every page for any attachments, and then a
new query for each attachment for each page when we call get_page_uri().
Not sure if there's an easy way to prefetch all of that without more
churn.
Tempted to punt now and deal with it later. That whole function is very
ugly.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15915#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list