option-tree icon indicating copy to clipboard operation
option-tree copied to clipboard

OT_Cleanup->maybe_cleanup() slow on large multisite networks

Open earnjam opened this issue 8 years ago • 1 comments

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?

earnjam avatar Apr 20 '16 17:04 earnjam

Not a bad idea. I'll look into it.

valendesigns avatar Mar 11 '19 08:03 valendesigns