nossr50/mcMMO — Issue #167: /mmoupdate - Hogs main thread
Author: dawninginnovations
Created: 2011-12-08 07:54:13+00:00
State: open

Noss:

Great plugin. Been a fan since I came across it 5 months ago. We've been wanting to switch from flat file to MySQL for a while and I finally had some spare time between testing CraftBukkit RBs and other plugins. When I started the conversion with /mmoupdate the server became unresponsive after a few seconds and resulted in a read time out.

I took a look at your source and noticed that your import routine is a loop over all users records in the main thread. Having noticed that, I let /mmoupdate run its course the second time around (after dropping all mcmmo tables). Again, the client disconnected due to a read time out and the server became unresponsive. But after a while, things were back to normal.

So, the good news is that the import still works. The bad news is that the process hogs the main thread. The original flat file contain a 1000+ records. While not a show stopper since this command won't be run more than once and hopefully during a scheduled update period, but at a minimum you should warn users that the server may become unresponsive if they have a large user base. It would be better, if the conversion process were forked off as a separate lower priority thread.

Just some feedback. Again, great plugin. Always looking to see what new things are coming down the road.

Best regards,

Frelling