PDA

View Full Version : About EQDKP>NDKP Upgrade



set
11-10-2005, 04:34 PM
It seems there is a lot of place for optimization in the upgrade process.
In each loop of each update method (updateRaids, players, raidattendance, ..) you create a new instance of your NDKP class. I don't know much about PHP and i was too lazy to read the whole siteClass.php file, but i guess you do this in order to connect to the NDKP database. Is it really necessary to create an instance of this big class for such a little task? and, above all, why is this done in *every* iterations of the loop?

We had to update 5000+ entries from the eqdkp_raid_attendees table. With the php file you supply, about 100/200 entries where inserted per second. So it would have taken about a minute to insert the whole table. BUT! connection with the eqdkp base seemed to drop during the process. Maybe the database was not effective enough? the connexion was too long? or was it php? but the mysql_fetch_object loop stopped early. Sometimes, we would insert 2000 values, other times 3000...

Anyway, i moved your class instanciation, and database conexion just above the mysql_fetch_object loop, and, oh magic o/, attendance table was filled much faster, almost instant! and the job was done correctly.
I don't know if that's correct though! as i told you, i don't know much about php etc.. but it worked fine, so i guess its ok!

Thanks again for all the work you put in this DKP system and all the answers you deliver to us daily.

Here's a bonus: Paladin loot!!1!
That's not *all* the paladin loot, but almost! I'm sure alliance guilds using your system would prefer not to have to add them manually :p
grab that here (http://tugudum.free.fr/wow/nerfpallies.sql).

a67rhf7823jn8747==