[wp-trac] [WordPress Trac] #18536: Improve performance of WP_Query core

WordPress Trac wp-trac at lists.automattic.com
Mon Jan 30 16:38:09 UTC 2012


#18536: Improve performance of WP_Query core
--------------------------------------------------+------------------
 Reporter:  cheald                                |       Owner:
     Type:  task (blessed)                        |      Status:  new
 Priority:  normal                                |   Milestone:  3.4
Component:  Performance                           |     Version:
 Severity:  normal                                |  Resolution:
 Keywords:  early has-patch commit needs-testing  |
--------------------------------------------------+------------------

Comment (by nacin):

 That brings up a good point. A query such as `WP_Query( 'post__in' =>
 array( 5, 15 ) )` will look rather silly: It will first grab all IDs when
 we already have them. Perhaps a further optimization would be that, given
 a simple $where and a big enough $limit, we can avoid making the query all
 together, and simply populate the post objects and order them in PHP. But
 I'm perhaps getting a bit ahead of things. Ryan might have a better idea
 on how we can abstract this out so existing prime attempts are not
 adversely affected, and there is a canonical way to prime a cache.

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


More information about the wp-trac mailing list