[wp-trac] [WordPress Trac] #5557: wxr importer: defer comment counts
WordPress Trac
wp-trac at lists.automattic.com
Tue Jan 1 00:35:41 GMT 2008
#5557: wxr importer: defer comment counts
-------------------------+--------------------------------------------------
Reporter: tellyworth | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 2.5
Component: General | Version:
Severity: normal | Keywords: has-patch
-------------------------+--------------------------------------------------
Comment counts are calculated and recalculated every time a comment is
inserted. That's inefficient when there are multiple comments per post.
The enclosed patch implements and uses a wp_defer_comment_counting()
function. It's based on wp_defer_term_counting().
I also removed the comment_exists() check in the importer, since in
practice it always returns false (the post_exists() check means we only
attempt to import comments when the parent post is new, and hence has no
comments).
--
Ticket URL: <http://trac.wordpress.org/ticket/5557>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list