[wp-trac] [WordPress Trac] #40351: Term post re-counts scale poorly, are common and difficult to avoid

WordPress Trac noreply at wordpress.org
Sat Sep 5 02:05:22 UTC 2020


#40351: Term post re-counts scale poorly, are common and difficult to avoid
-------------------------------------------------+-------------------------
 Reporter:  mattoperry                           |       Owner:  whyisjake
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.6
Component:  Taxonomy                             |     Version:  4.8
 Severity:  normal                               |  Resolution:
 Keywords:  needs-unit-tests has-patch needs-    |     Focuses:
  testing early needs-dev-note needs-refresh     |  performance
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):

 * keywords:  needs-unit-tests has-patch needs-testing early needs-dev-note
     =>
     needs-unit-tests has-patch needs-testing early needs-dev-note needs-
     refresh


Comment:

 I've started a pull request based on [attachment:"40351.4.patch"] so the
 existing tests begin running on the screen.

 It's still a WIP but so far I have made a few minor changes:
 * Documented `countable_status` filter, I suspect it will need a rename to
 the plural
 * Some tidy up for coding standards
 * Modified `maybe_recount_posts_for_term()` to allow for developers
 deferring post counts by switching to `wp_update_term_count()`
 * There were a few errors in the patch that I am slowly tidying up and the
 unit tests alert me to them, as best I can tell mostly type casting that
 needs fixing up

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


More information about the wp-trac mailing list