[wp-trac] [WordPress Trac] #8071: Refrain from querying all the comments on a post when paged

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 5 22:17:15 GMT 2008


#8071: Refrain from querying all the comments on a post when paged
-------------------------+--------------------------------------------------
 Reporter:  markjaquith  |       Owner:  anonymous
     Type:  enhancement  |      Status:  new      
 Priority:  normal       |   Milestone:  2.7      
Component:  General      |     Version:  2.7      
 Severity:  normal       |    Keywords:           
-------------------------+--------------------------------------------------
 If a post has more than (comment_per_page) comments, we should query them
 specifically, not query all the comments and sort in PHP (doesn't scale
 well).

 Logic:

 if threading is off, use a simple limit query

 elseif the page has equal or fewer comments than (comments_per_page),
 query them all

 else query (comments_per_page) parent comments, and keep doing queries for
 their children, up to the threading limit (10).

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8071>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list