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

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 6 19:45:13 UTC 2011


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

 * milestone:  Future Release => 3.2


Comment:

 New take on this, after seeing the database dump on #16846:

 It was decided originally that excluding in PHP is better for performance.
 That makes sense in theory.

 However, when trash was implemented, we added `post_status != 'trash'` to
 the query, probably without regard to the original decision. I don't think
 the original decision was != versus NOT IN(), it was just having the check
 to begin with.

 Now with that said -- I haven't seen any complaints with regards to
 performance for the != trash.

 So we should either copy.move that to != 'spam', or NOT IN for both trash
 and spam, which shouldn't be much slower. There's going to be more spam
 comments than trash comments on pretty much every site, as spamming is
 going to be automated (and in far greater volumes), so I'm strongly
 inclined to deal with this one way or another now.

 I've also opined here that increasing the limits (both initial, and the
 jump) on successive queries makes a lot of sense. We should do that
 improvement as well.

 Moving to 3.2. This is one of those lighter/faster tasks.

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


More information about the wp-trac mailing list