[wp-trac] [WordPress Trac] #19372: Don't call wp_count_comments() when we don't need to

WordPress Trac noreply at wordpress.org
Wed Nov 4 22:46:41 UTC 2015


#19372: Don't call wp_count_comments() when we don't need to
----------------------------+-----------------------------
 Reporter:  johnbillion     |       Owner:  wonderboymusic
     Type:  task (blessed)  |      Status:  assigned
 Priority:  normal          |   Milestone:  4.4
Component:  Comments        |     Version:  3.2
 Severity:  minor           |  Resolution:
 Keywords:  has-patch       |     Focuses:  performance
----------------------------+-----------------------------

Comment (by justindocanto):

 @bordoni - I understand that this would stop the query, but 1) Also stop
 the function in the entire WordPress area and 2) you would have a broken
 'pending comment count' in the top admin menu.

 That suggestion is more of a duck tape job and not a proper solution.
 There should be a way to remove the item from the menu that also stops the
 query and allows the function to run anywhere else it is used.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/19372#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list