[wp-trac] [WordPress Trac] #8057: get_comments() needs to cache
WordPress Trac
wp-trac at lists.automattic.com
Tue Nov 4 10:10:54 GMT 2008
#8057: get_comments() needs to cache
-----------------------------+----------------------------------------------
Reporter: Viper007Bond | Owner:
Type: defect | Status: new
Priority: highest omg bbq | Milestone: 2.7
Component: Comments | Version: 2.7
Severity: critical | Keywords: needs-patch
-----------------------------+----------------------------------------------
Reported by Mark.
`get_comments()` needs to use the internal cache, even if it's just
caching the results of that particular SQL query.
`get_page_of_comment()` uses `get_comments()` to get all comments of the
single comment's post so it can loop through them and calculate what page
that comment will be on. Each call to `get_page_of_comment()` (and there's
a lot due to `get_comment_link()`) currently results in a MySQL query.
Ouch.
--
Ticket URL: <http://trac.wordpress.org/ticket/8057>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list