[wp-trac] [WordPress Trac] #27571: WP_Comment_Query::query() querying for too much data
WordPress Trac
noreply at wordpress.org
Sat Sep 26 16:01:07 UTC 2015
#27571: WP_Comment_Query::query() querying for too much data
--------------------------+---------------------------
Reporter: mkilian | Owner: boonebgorges
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.4
Component: Comments | Version: 3.8.1
Severity: normal | Resolution: fixed
Keywords: needs-patch | Focuses:
--------------------------+---------------------------
Changes (by boonebgorges):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"34599"]:
{{{
#!CommitTicketReference repository="" revision="34599"
Improve post field lazyloading for comments.
[34583] modified comment queries so that all post fields are no longer
loaded
by default. Instead, they are loaded only when requested on individual
comment
objects. This changeset improves that flow:
* `WP_Comment` magic methods `__isset()` and `__get()` should only load
the post when a post field is being requested.
* The new `update_comment_post_cache` argument for `WP_Comment_Query`
allows developers to specify that, when comments are queried, all of the
posts matching those comments should be loaded into cache with a single DB
hit. This parameter defaults to false, since typical comment queries are
linked to a single post.
Fixes #27571.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27571#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list