Hi,
We noticed that the Members::update_online_time() function (in the classes/Members.php file) is hooked to WordPress's built-in set_current_user action. This action runs on every page load for logged-in users, not just on forum pages. This means that even in setups where wpForo is embedded on only 1-2 specific forum pages, an unconditional UPDATE wp_wpforo_profiles SET online_time = ... query is executed site-wide (shop pages, checkout, homepage, admin panel).
On our server, under high load, this situation appears in the MySQL slow query log with durations of 2-4.5 seconds due to profile table contention.
We checked the "Online Status Timeout" setting in the profile settings, but this only controls how long a user is displayed as online; it does not restrict the write frequency.
Would it be possible to introduce a setting that allows the update_online_time() function to write once every N minutes for each user (by checking the current value before writing), or a filter/hook that allows us to control this ourselves without patching the core plugin files?
We believe this would significantly reduce the database load on WooCommerce + wpForo installations where most of the traffic never touches the forum.
Best Regards,