[wp-trac] [WordPress Trac] #11399: clean_post_cache() generates enormous amounts of queries on sites with lots of pages, revisions or attachments
WordPress Trac
wp-trac at lists.automattic.com
Wed Aug 15 23:01:34 UTC 2012
#11399: clean_post_cache() generates enormous amounts of queries on sites with lots
of pages, revisions or attachments
-------------------------------------------------+-------------------------
Reporter: Denis-de-Bernardy | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future
Component: Optimization | Release
Severity: normal | Version: 2.9
Keywords: dev-feedback has-patch needs- | Resolution:
feedback |
-------------------------------------------------+-------------------------
Changes (by simonwheatley):
* keywords: needs-patch dev-feedback has-patch needs-feedback => dev-
feedback has-patch needs-feedback
Comment:
Part of the problem is that the query to get the post children, which are
then iterated over, includes revisions. Given that revisions shouldn't (?)
change, perhaps the query could be adjusted to not clear the caches of
children which are revisions. Something like the next diff.
In my client's particularly deeply nested hierarchy of this reduced the
number of times `clean_post_cache` was called from approximately 4,500
calls to 500 calls with `WP_POST_REVISIONS` set to 10 (so it could have
been even worse).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11399#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list