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

WordPress Trac noreply at wordpress.org
Fri Sep 18 19:27:41 UTC 2015


#8071: Refrain from querying all the comments on a post when paged
------------------------------------+---------------------------
 Reporter:  markjaquith             |       Owner:  boonebgorges
     Type:  enhancement             |      Status:  assigned
 Priority:  normal                  |   Milestone:  4.4
Component:  Comments                |     Version:  2.7
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+---------------------------

Comment (by boonebgorges):

 In [changeset:"34310"]:
 {{{
 #!CommitTicketReference repository="" revision="34310"
 Split the comment query.

 `WP_Comment_Query` now fetches comments in two stages: (1) a query to get
 the
 IDs of comments matching the query vars, and (2) a query to populate the
 objects corresponding to the matched IDs. The two queries are cached
 separately, so that sites with persistent object caches will continue to
 have
 complete cache coverage for normal comment queries.

 Splitting the query allows our cache strategy to be more modest and
 precise, as
 full comment data is only stored once per comment. It also makes it
 possible
 to introduce logic for paginated threading, which is necessary to address
 certain performance problems.

 See #8071.
 data is only stored once per comment, instead of along with
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/8071#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list