[wp-hackers] 2.0.4 Performance Issues

Ryan Boren ryan at boren.nu
Sun Aug 6 17:14:10 GMT 2006


Paul Mitchell wrote:
> Give that man a cigar! Thanks to your use case, I've exposed what must
> be considered a performance issue in WP_Query::get_posts() - the search
> for a single page id by name is linear, calling get_page() each
> iteration until the desired page is found. On a shared site with a
> significant number of pages, that could grind.
>
> http://trac.wordpress.org/browser/tags/2.0.4/wp-includes/classes.php#L379
>   

That code was in 2.0.  It's been there awhile.  I agree that it is 
inefficient, which is why it is gone from 2.1.  It's not something that 
changed between 2.0.3 and 2.0.4 though.

Ryan



More information about the wp-hackers mailing list