[wp-trac] [WordPress Trac] #58368: WordPress dashboard is very slow when there are many comments (and the database isn't great)

WordPress Trac noreply at wordpress.org
Fri Jun 9 14:33:00 UTC 2023


#58368: WordPress dashboard is very slow when there are many comments (and the
database isn't great)
--------------------------------------+--------------------------
 Reporter:  Guss77                    |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  6.3
Component:  Comments                  |     Version:  6.2.2
 Severity:  minor                     |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+--------------------------

Comment (by FolioVision):

 That's just the data above. Here's an interpretation.

 Wth the mini plugin the situation did not improve as it took 7.6 to 8
 seconds:

 WP_Comments_List_Table::comment_type_dropdown() does not count the
 comments, it only checks to see if there is any comment of the desired
 type. That kind of a check (if the comments are being counted, then do not
 use order by) is does not help improve performance.

 With the proof of concept pull request the situation did not improve, the
 query would take 7.1 to 7.8 seconds:

 In your pull request @peterwilsoncc you tried to adjust the get_comments()
 calls in different places to remove the ordering where it's not necessary.
 But you omitted the exact single place where it matters for our issue:
 https://github.com/WordPress/wordpress-develop/pull/4571/files#diff-
 1018e4974931b2cea88b413dadc533d3cf535f977c7f3a5f310e0bc7376233a8R522

 So our fix it still needed. This is how much faster it gets - 0.7 to
 seconds or it does not even appear in the list of slow queries.

 Let's get ''this'' performance bottleneck solved gentlemen. Arguments
 about whether WordPress performance bottlenecks matter (of course they do,
 except for toy sites and small personal sites) are anti-productive.

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


More information about the wp-trac mailing list