Recent comments dashboard widget prevents the dashboard from loading when there is a lot of spam comments
|Reported by:||camilolopez||Owned by:|
Since 3.2 RC2 the recent comments dashboard widget starting taking way too long, to the point
of hitting the limit time of execution, when there are a lot of recent spam comments and very few recent approved/waiting for approval.
As of 3.2 RC3 the logic to display the widget is: take the most recent 50 comments filter by approved/pending if the number of recent comments to show has been reached, stop otherwise try again with the next 50 comments and so on until the number of recent comments to be shown is reached.
In one of my test blogs happened have 30k+ spam comments most of which (20k+) are more recent than the newest approved/pending comment, the effect of this is my dashboard never finishes loading give the widget's loop take too much time and the PHP execution gets halted.