[wp-trac] [WordPress Trac] #32366: wp_count_comments() is hardcoded into /wp-admin/menu.php and queries all comments every single page load within the admin area, regardless of if edt_posts is removed from top menu or not
WordPress Trac
noreply at wordpress.org
Tue May 12 23:36:34 UTC 2015
#32366: wp_count_comments() is hardcoded into /wp-admin/menu.php and queries all
comments every single page load within the admin area, regardless of if
edt_posts is removed from top menu or not
-------------------------------------+-------------------------------------
Reporter: justindocanto | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 4.2
Severity: normal | Resolution:
Keywords: needs-patch dev- | Focuses: administration,
feedback | performance
-------------------------------------+-------------------------------------
Changes (by chriscct7):
* keywords: => needs-patch dev-feedback
* version: 4.2.2 => 4.2
Comment:
There are a couple of options here that I've thought of thus far:
- Disable counts for comments once it gets above a certain number (solves
the problem but loses ui).
- Try to make the comment count query more efficient (unlikely to make
that much of an improvement though).
- Provide a filter to turn off the counts
- We could store the counts in options, and when a comment is added or
removed increment or decrement the options and then pull the numbers from
the options instead of querying the comments table
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32366#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list