Quick Notes (Development)

by Joe I, Tuesday, April 16, 2024, 09:01 (13 days ago) @ Auge

Performance Note: In all instances tested, page load time went from 10-15 seconds in base 20240308.1 down to sub 1 second with these modifications.


😀👌

That's a very remarkable enhancement.

I do see about a 40% increase in page load time over 2.4.24 (from 500ms to 800ms avg), but page load is still acceptably under 1 second, even within our forum of 500,000 posts / 40,000 threads.


With increasing complexity of the database queries, a certain slowdown is to be expected. However, your measurements remain within the limits of what is initially acceptable.

I had forgotten that I also made a modification to base 2.4.24 for our forum to significantly improve latest_postings performance for non-logged in users (with forum running on MariaDB and not MySql), so these page load numbers would be unique to us for that scenario. For logged in users, the above comparison is relevant and acceptable.

If these modifications work for you, it should hopefully eliminate a need to further customize SQL queries based on forum spam settings.


At the very least, it would make it for a start unnecessary to split the queries according to registered and non-registered users, according to whether spam protection measures are switched on or not or according to other unnamed criteria.

If and when we see the necessity to split queries I would like to do this in stored procedures on the MySQL-server but not in the PHP-code. To do this, we need a reliable way of recognising whether the database user of a forum operator is allowed to create, change, delete and execute stored procedures. If not, an upgrade to the corresponding version must be prevented. With the complete conversion of the database engine to InnoDB, we have at least laid the foundation for this because we can now work with transactions which is a precondition to reliably create stored procedures with the mysqli-library (as far as I see in code examples).

Yes agreed that Stored Procedures would be the way to go at some point. From last year, I do see Andreas Schneider had written a quick procedure to test out whether the forum admin had SP write capability, and something like that could be used to test before proceeding with an upgrade. I had also tested it out on our own forum with positive results. Hopefully / likely that very few forum administrators would be affected by this change.


Complete thread:

 RSS Feed of thread