2020-01-12, 01:18 PM
For context, I'm trying to reduce SQL usage on my forum. I've discovered that the script continues to perform select queries on the sessions table for thread pages and forum pages despite disabling "show users browsing this thread/forum". This is based on the debugger information and my own analysis of the script itself.
I understand the importance of write queries, as this allows the script to track who's online and who isn't -- I'm not interested in disabling SQL writes to the sessions table. Even after disabling showing who's browsing threads and forum pages, MyBB continues to do select queries on this table (which has > 7000 rows on my forum). Showing who's online is still enabled for the index as this gives members a feeling for how busy the forum is, which is a plus.
Which core files should I edit to prevent MyBB from performing select queries when showthread.php and forumdisplay.php are executed? To reiterate, I've disabled the feature to show who's browsing what on all pages except the index, and in spite of this, MyBB carries on doing select queries for pages other than the index when it absolutely isn't needed.
For showthread.php, the code appears to begin at line 1489. Is there a straightforward edit one can make?
Edit: It just occurred to me that the online status indicator displayed in threads (next to member avatars) probably needs to query the sessions table. It's still something I could get away with disabling on forumdisplay.php though.
I understand the importance of write queries, as this allows the script to track who's online and who isn't -- I'm not interested in disabling SQL writes to the sessions table. Even after disabling showing who's browsing threads and forum pages, MyBB continues to do select queries on this table (which has > 7000 rows on my forum). Showing who's online is still enabled for the index as this gives members a feeling for how busy the forum is, which is a plus.
Which core files should I edit to prevent MyBB from performing select queries when showthread.php and forumdisplay.php are executed? To reiterate, I've disabled the feature to show who's browsing what on all pages except the index, and in spite of this, MyBB carries on doing select queries for pages other than the index when it absolutely isn't needed.
For showthread.php, the code appears to begin at line 1489. Is there a straightforward edit one can make?
Edit: It just occurred to me that the online status indicator displayed in threads (next to member avatars) probably needs to query the sessions table. It's still something I could get away with disabling on forumdisplay.php though.