[wp-trac] [WordPress Trac] #57803: Use wp_cache_get_multiple in fill_descendants

WordPress Trac noreply at wordpress.org
Wed Mar 29 10:18:51 UTC 2023


#57803: Use wp_cache_get_multiple in fill_descendants
------------------------------+---------------------------
 Reporter:  spacedmonkey      |       Owner:  spacedmonkey
     Type:  enhancement       |      Status:  closed
 Priority:  normal            |   Milestone:  6.3
Component:  Comments          |     Version:  4.4
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:  performance
------------------------------+---------------------------
Changes (by spacedmonkey):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55607" 55607]:
 {{{
 #!CommitTicketReference repository="" revision="55607"
 Comments: Use wp_cache_get_multiple in `WP_Comment_Query`.

 In the `fill_descendants` method in `WP_Comment_Query`, there is a loop
 the calls `wp_cache_get` to get `child comments. Instead of getting one
 key at a time, use `wp_cache_get_multiple` and get all keys at once.

 Props spacedmonkey, tillkruess, mukesh27.
 Fixes #57803.
 }}}

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


More information about the wp-trac mailing list