[wp-trac] [WordPress Trac] #19901: Speeding up Dashboard and Comment moderation SQL load

WordPress Trac noreply at wordpress.org
Thu Mar 31 09:07:17 UTC 2022


#19901: Speeding up Dashboard and Comment moderation SQL load
-------------------------------------------------+-------------------------
 Reporter:  FolioVision                          |       Owner:
                                                 |  spacedmonkey
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  6.0
Component:  Comments                             |     Version:  3.3
 Severity:  major                                |  Resolution:  fixed
 Keywords:  needs-testing has-patch commit       |     Focuses:
  assigned-for-commit                            |  performance
-------------------------------------------------+-------------------------
Changes (by spacedmonkey):

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


Comment:

 In [changeset:"53036" 53036]:
 {{{
 #!CommitTicketReference repository="" revision="53036"
 Comments: Improve performance of the `wp_count_comments` function.

 Improve performance of the `wp_count_comments` function by replacing a
 complex query with multiple calls to the `get_comments` function. Passing
 the `count` parameter to the `get_comments` function results in a simple
 count query that returns quickly. Using `get_comments` also means that
 query is cached and run through filters.


 Props FolioVision, markjaquith, nacin, ryan, coffee2code, wonderboymusic,
 ComputerGuru, jb510, SergeyBiryukov, Znuff, Rahe, uday17035, spacedmonkey,
 peterwilsoncc.
 Fixes #19901.
 }}}

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


More information about the wp-trac mailing list