You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've observed that the recent changes to this plugin are causing an update_option call on every page view. This causes performance issues on high-traffic sites, because frontend site views cause a database write in addition to reading all of their normal content out of the database.
It feels like we shouldn't have to update any content on a normal frontend page view. I'd only expect an option to get written if the user has taken some action which could change the contents of the option, or possibly if a cache has expired.
The text was updated successfully, but these errors were encountered:
I've observed that the recent changes to this plugin are causing an
update_option
call on every page view. This causes performance issues on high-traffic sites, because frontend site views cause a database write in addition to reading all of their normal content out of the database.I'm looking at this line: https://github.com/the-events-calendar/the-events-calendar-category-colors/blob/develop/src/Category_Colors/Main.php#L247
get_category_terms
is called byload_categories
, which is hooked toinit
, which runs every time WP spins up to serve a request.It feels like we shouldn't have to update any content on a normal frontend page view. I'd only expect an option to get written if the user has taken some action which could change the contents of the option, or possibly if a cache has expired.
The text was updated successfully, but these errors were encountered: