Make WordPress Core

Opened 7 years ago

Closed 7 years 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: camilolopez Owned by:
Milestone: Priority: normal
Severity: major Version: 3.2
Component: General Keywords:
Focuses: Cc:


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)

#1 @duck_
7 years ago

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?

#2 @camilolopez
7 years 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.

#3 @scribu
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Said ticket is not closed, so it's not fixed.

Note: See TracTickets for help on using tickets.