[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
Thu May 25 01:01:46 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     |     Focuses:  performance
--------------------------+--------------------------

Comment (by peterwilsoncc):

 I think using a transient would be problematic on large sites, a different
 transient would be created for each post. If set not to expire, then each
 of these transients would be auto-loaded.

 I hacked together a
 [https://gist.github.com/peterwilsoncc/fa8d36a3dd1a7c822bb883901e836476
 mini-plugin] using the `comments_clauses` filter to test the results with
 a lot of comments (@Guss77 this may suit your purpose rather than hacking
 core). Unfortunately generating millions of comments takes a while so I
 haven't been able to get some numbers.

 I don't mind the proposed patch but would need to test to make sure it
 doesn't have unintended consequences. DB behavior without a ordering
 clauses can lead to unexpected results, as Jonny and I have seen on other
 tickets.

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


More information about the wp-trac mailing list