gabrielecabrini / EconomyPlus

Minecraft plugin (Economy) for 1.8 to 1.18
https://www.spigotmc.org/resources/economyplus.92975/
GNU General Public License v3.0
10 stars 14 forks source link

Don't run db save asynchronously #18

Closed oddstr13 closed 2 years ago

oddstr13 commented 2 years ago

Fixes issue #16, but probably causes some performance degradation due to forcing the server thread to wait for IO.

Best would probably be to place a cache between the database and the Vault API, so that the value can be returned and changed without waiting on IO. A scheduled task could then flush dirty cache to the database in the background every second or so.

gabrielecabrini commented 2 years ago

I will remove async part but i will add a cache for the saved players.