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

WordPress Trac noreply at wordpress.org
Wed May 13 00:27:00 UTC 2015


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

Comment (by justindocanto):

 The proposed solution here does not fix what I mentioned in #32366.

 Yes, both mention that it shouldn't be called when it's not needed, but
 the scenarios are completely different.

 If I'm an admin and can 'edit_posts' Im still going to have the problem
 mentioned in #32366 because I'm still querying 5,000,000 comments on every
 single page load.

 I think this ticket needs a better way to disable the function from being
 called OR we leave my ticket open and create another solution for the
 problem I brought up since this solution does not address it.

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


More information about the wp-trac mailing list