[wp-trac] [WordPress Trac] #57802: Prime post cache in WP_Comments_List_Table

WordPress Trac noreply at wordpress.org
Fri Feb 24 14:17:35 UTC 2023


#57802: Prime post cache in WP_Comments_List_Table
--------------------------+----------------------------
 Reporter:  spacedmonkey  |      Owner:  (none)
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Future Release
Component:  Comments      |    Version:  3.1
 Severity:  normal        |   Keywords:  good-first-bug
  Focuses:  performance   |
--------------------------+----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57802>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list