option-tree
option-tree copied to clipboard
OT_Cleanup->maybe_cleanup() slow on large multisite networks
I have a big multisite network (over 12,000 sites), so there are a lot of tables in the database.
SHOW TABLES LIKE
queries are pretty slow since they hit the information_schema
. We use OptionTree in one of our themes, and any admin request on that theme makes a SHOW TABLES LIKE
call because the maybe_cleanup()
function is hooked to admin_menu
.
Is there any way we can limit the number of times this is called? Perhaps just run the cleanup once at theme or plugin activation?
Not a bad idea. I'll look into it.