[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:57:45 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 disagree. Even if you hacked together something to only disable
 it when it runs on {{{wp-admin/menu.php}}} you would still have a broken
 pending comment count because the code blindly uses $awaiting_mod.

 Again, the idea of stopping the wp_comment_count query is a duck tape
 solution, and not a proper answer to the overall issue detailed on #32366.

 There needs to be a way to disable this menu item, and it's associated
 query. The easiest answer is a simple flag.

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


More information about the wp-trac mailing list