Opened 23 months ago
Closed 23 months ago
#17946 closed defect (bug) (duplicate)
Recent comments dashboard widget prevents the dashboard from loading when there is a lot of spam comments
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 3.2 |
| Severity: | major | Keywords: | |
| Cc: |
Description
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.
Change History (3)
comment:2
camilolopez — 23 months ago
Dupe indeed, I had not seen the problem before, maybe I never had all 20K+ most recent comments be spam, has this been fix? will a fix be included in 3.2? It seems what the original reporter suggest, fetch only approved/pending statuses directly on MySQL makes a lot of sense.

Looks like duplicate of #14222, but you're saying this has only been a problem since 3.2-RC2 and you didn't experience performance issues on 3.1 and before?