Version 0.92 Installed and working in vB 3.7.3 PL1. This add-on ROCKS!
Warning - Raw Database and system changes used below. Do not attempt if changes aren't clear, you could hork your entire installation!
That aside.. The Casino worked OK for a while, then I was getting the "This game is AJAX Powered", or random user page reloads, booting them. By this time, myself, as well as a huge mob of members were... unhappy addicts, and needed their casino back! This is the most AWESOME add-on I've ever come across, by the way! First I unloaded/reloaded add-on. Finally corrected errors by optimizing the DB Tables, then tweaking php5-xcache module options. Optimizer/Cache could also be Zend Server, or any other PHP caching optimizer, something vBulletin recommends for all larger installations.
Below are the general steps I took, which reduced server load greatly, and increased speed by ∞, followed by "Suggestions for next version".
*Note: The below does depend on free real RAM for caching, so if server is digging heavily into swap space to start with, the below may not be as magic as they were for this case, but should still help.
What I did to speed up existing code database access by ∞, most commands entered at mysql client prompt:
- Change the "text" field types in database to varchar(x) with x being between 20 and 64 for most fields, like game name, in all tables. Make sure the field is big enough, but not overboard, e.g. 200 chars for 'username'. Any time a text field is used in query, it forces a temp table, no matter how small the query. The only fields that couldn't be readily changed were the PHP code storage.
- Add indexes to all tables linked or used in conditions, pretty good performance increase, small DB size increase due to small table size.
- Once most "text" fields in most casino_* files were changed to "varchar()", then indexed if needed:
- Run ANALYZE TABLE casino_<tablename> - for each table.
- If required, install php5-xcache module (or similar) and tweak settings.
WishList for next version- Would LOVE to have plugin use the vbulletin Datastore memcache config if enabled.
- Lacking full memcache ability, ability to use the php5-memcache module if available, greatly reducing overhead from very frequent DB Reads
Details: Easy-ish explanation, hosting providers may be able/eager to help with this as well. In my.cnf, enable slow-query-log at 1-3 seconds, AND "log queries without indexes". For each <query> that shows up in mysql-slow, run "Explain <query>" in mySQL CLI, if it doesn't show indexes, add them to the fields in search portion of query (where clause, in, =, etc), especially if under "Extra" it says "using filesort" or similar, those are killing performance, especially at the rate the query is called.
Hope this helps some that were having problems with overloading/speed problems.