ElgarL / Towny

Towny Advanced plugin for Bukkit @ http://palmergames.com/towny/
http://palmergames.com/towny/
75 stars 91 forks source link

MASSIVE performance increase of SQL data source #119

Closed ShadowDog007 closed 10 years ago

ShadowDog007 commented 10 years ago

Tested working.

Note that code has not been added to automatically update a users database.

ElgarL commented 10 years ago

This is a nice piece of code, however. It doesn't handle DB conversion so it breaks all older databases. It doesn't handle reload/restart so saving the queues will allow it to resume but it won't handle a restart.

ShadowDog007 commented 10 years ago

Well fix it yourself then.

It was ridiculous what you were doing before. My friend had a 200KB string in his towny table.

ElgarL commented 10 years ago

The SQL implementation was simply a flat-file port. It has never been optimised. I'm commenting to say we don't accept partial fixes as pulls.

ShadowDog007 commented 10 years ago

Well fix it yourself then.

It took me like 20 minutes to write that. You should have done it right in the first place.

ElgarL commented 10 years ago

Don't bring an attiutde here.

ShadowDog007 commented 10 years ago

One more thing to note, not sure if plotPrice is handled correctly if it is taken from the town.

ErgoAsh commented 10 years ago

Is that fix is fully working now without changing something in database?

ElgarL commented 10 years ago

No it's not backwardly compatible, but we will incorporate this once time allows.

ErgoAsh commented 10 years ago

Thanks for response, I'm waiting.

ElgarL commented 10 years ago

Included most of this with my update to use prepared statements.