[wp-trac] [WordPress Trac] #56100: Call update_post_author_caches in WP_Posts_List_Table class

WordPress Trac noreply at wordpress.org
Thu Jul 21 09:05:33 UTC 2022


#56100: Call update_post_author_caches in WP_Posts_List_Table class
-------------------------------------+-------------------------------------
 Reporter:  spacedmonkey             |       Owner:  (none)
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  6.1
Component:  Posts, Post Types        |     Version:  3.0
 Severity:  normal                   |  Resolution:
 Keywords:  good-first-bug has-      |     Focuses:  administration,
  patch                              |  performance
-------------------------------------+-------------------------------------
Changes (by spacedmonkey):

 * version:   => 3.0
 * milestone:  Future Release => 6.1


Comment:

 For context [53482] and #55716.

 Priming users can expensive and should be avoided if possible. In [53482]
 users are only primed in the loop. So for the most part, most uses of
 WP_Query will already be covered. There are only a couple of uses in core
 like this do not use the loop and get posts.

 Also `WP_Posts_List_Table` does something odd around pages, see
 [https://github.com/WordPress/wordpress-
 develop/blob/828d5189881024afc82dd41af531db4f1898027d/src/wp-
 admin/includes/post.php#L1238 this]. This loads all pages. This change
 ensues that only displayed posts users are primed.

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


More information about the wp-trac mailing list