[wp-trac] [WordPress Trac] #14222: Improve dashboard recent comments widget performance by not fetching spam comments

WordPress Trac wp-trac at lists.automattic.com
Thu Jul 8 03:53:13 UTC 2010


#14222: Improve dashboard recent comments widget performance by not fetching spam
comments
----------------------------+-----------------------------------------------
 Reporter:  Viper007Bond    |       Owner:                         
     Type:  defect (bug)    |      Status:  new                    
 Priority:  normal          |   Milestone:  Awaiting Review        
Component:  Administration  |     Version:  3.0                    
 Severity:  normal          |    Keywords:  has-patch needs-testing
----------------------------+-----------------------------------------------

Comment(by nacin):

 Replying to [comment:5 azaozz]:
 > Replying to [comment:4 nacin]:
 > This sounds like a good idea. Perhaps we can loop 5 times and if there
 aren't 5 non-spam comments, can run a query to select only non-spam
 comments. Primarily this was affecting larger sites with many comments so
 the testing should be done on a comments table with at least few hundred
 thousands rows.

 Perhaps we can also progressively increase the limit during each
 iteration, to keep sites that 50 is enough running the same, but lower the
 chances we get exposed to the query we're dreading. i.e. first 50, then
 next 100, then next 150, then next 200, then next 250. We then go from
 checking 250 comments to three times that.

 Also, we should increase the # we pull based on the setting by a factor of
 ten. In 3.0 we enabled the widget to be customizable up to 30. If 5, then
 50, if 10, then 100, if 18, then 180. Given that Akismet says 83% of all
 comments are spam, this seems reasonable.

 Just trying to get creative here.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14222#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list