#57802 closed enhancement (fixed)
Prime post cache in WP_Comments_List_Table
Reported by: | spacedmonkey | Owned by: | spacedmonkey |
---|---|---|---|
Milestone: | 6.3 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Comments | Keywords: | good-first-bug has-patch commit add-to-field-guide |
Focuses: | performance | Cc: |
Description
In WP_Comments_List_Table
class, the post is title is displayed. This results in lots of single lookups to a post. The WP_Comment_Query class ( and get_comments ), has a param called update_comment_post_cache
that primes all post caches in a single call. Set this arg to true in the call to get_comments
should improve performance.
Change History (5)
This ticket was mentioned in PR #4156 on WordPress/wordpress-develop by adarshakshatPosimyth.
21 months ago
#1
- Keywords has-patch added
#2
@
21 months ago
- Keywords commit added
- Milestone changed from Future Release to 6.3
- Owner set to spacedmonkey
- Status changed from new to assigned
Assigning to myself, to 6.3 and marking ready to commit. Will merge when trunk opens again for 6.3 release.
@spacedmonkey commented on PR #4156:
21 months ago
#4
Committed into core https://core.trac.wordpress.org/changeset/55513
Note: See
TracTickets for help on using
tickets.
Set "update_comment_post_cache" param to true when calling get_comments in WP_Comments_List_Table https://core.trac.wordpress.org/ticket/57802
Trac ticket: