[wp-trac] [WordPress Trac] #37392: Multisite "Sites" screen: Add links to filter websites by status
WordPress Trac
noreply at wordpress.org
Wed Jun 5 21:15:02 UTC 2019
#37392: Multisite "Sites" screen: Add links to filter websites by status
-------------------------------------------------+-------------------------
Reporter: thomaswm | Owner: mnelson4
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.3
Component: Networks and Sites | Version: 3.0
Severity: normal | Resolution:
Keywords: needs-unit-tests needs-patch needs- | Focuses: multisite
refresh |
-------------------------------------------------+-------------------------
Comment (by mnelson4):
Thanks for the patch @spacedmonkey and testing @pbiron !
> wp_count_sites did have caching but not cache invalidation
Oh right! So I suppose if we used 37392.8.patch's `wp_count_sites`, we'd
need to invalidate the cache every time a site was created, deleted, or
its status was changed, right? That sounds like a bit of work...
> That query in count_users is a nightmare and doesn't scale. See #38741
for more information.
You're right that query was based off `count_users`, although I suspect it
would scale better than `count_users` because it doesn't use `LIKE` in the
query.
> I am definitely NOT your go-to guy on efficiency issues, but I will note
that the version of wp_count_sites() is an order of magnitude SLOWER than
that in 37392.8.patch...on a real-world network with ~2000 sites
I'm also no performance expert, but could also do some benchmarking if
that would help.
But regardless, does 37392.diff sounds like it will be fast enough? Seeing
how it avoids needing to do cache invalidation, it sounds like a winner to
me (with the tweaks @pbiron mentioned).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37392#comment:36>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list