[wp-trac] [WordPress Trac] #16846: wp_dashboard_recent_comments can generate hundreds of queries

WordPress Trac wp-trac at lists.automattic.com
Sun Mar 13 11:04:03 UTC 2011


#16846: wp_dashboard_recent_comments can generate hundreds of queries
--------------------------+---------------------------------
 Reporter:  ocean90       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  high          |  Milestone:  Future Release
Component:  Comments      |    Version:  3.1
 Severity:  normal        |   Keywords:  has-patch 3.2-early
--------------------------+---------------------------------
 ''Reported by a good friend.''

 '''How to reproduce it:
 '''
 You need a site with > 4000 comments. Now go to the dashboard, recent
 comments widget and change the number of comments to show too 3.

 '''What will happen:
 '''
 You get a slowly backend because of ~100 queries more.

 '''How to fix it:
 '''
 {{{/wp-admin/includes/dashboard.php}}} line 612, instead of the static
 number {{{5}}} it should be {{{$total_items}}}.

 Related: r16922

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16846>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list