[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 21:30:57 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:  needs-patch dev-feedback has-patch   |  Resolution:
  needs-feedback                                 |
-------------------------------------------------+-------------------------
Changes (by simonwheatley):

 * cc: simon@… (added)


Comment:

 Replying to [comment:7 westi]:
 > This isn't very scalable at the moment.
 >
 > Not sure what the best approach to improving it is.


 Could you elaborate on what you don't think is scalable? Is it the passing
 of the array of already found IDs?

 I've run into this problem in an install today. Turning down the number of
 revisions helps a little.

 Separately, I've been playing with a similar implementation (before I
 found this ticket I whipped up a quick class which did the cache clearance
 and stored the IDs processed in a property, to avoid re-processing) and
 I'm actually unconvinced that the number of queries is reduced as there's
 not that many duplicates in the list to start with. The problem is sheer
 numbers, and running all the cache clearances in series rather than as a
 batch.

 I think the problem is also exacerbated if you are running an external
 object cache, as any latency for each request starts to add up.

 Basically, I'm left scratching my head here.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11399#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list