Describe the bug
If you're using the MySQL integration of the plugin, everything it does is done synchronously on the main thread, which halts the server until it is completed. This was causing major lag spikes on every PlayerJoin event because it was updating the cache with their username. Spark Report
To Reproduce
Steps to reproduce the behavior:
Enable MySQL in the config and fill out your settings
Get a bunch of people to set nicknames.
Watch them join the server and watch the server pause.
Expected behavior
This should all be handled asynchronously away from the main thread with the use of BukkitRunnables or likewise.
Software (please complete the following information):
Server Implementation: Airplane
Minecraft Version 1.17.1
Java Version: 16
Plugin Version: 2.1.4
Additional context
I've already fixed this bug on my copy, but it is behind a few git commits and drastically changes a bunch of stuff, so if I do manage to upload it to GitHub I will link it here. Otherwise, I am interested in seeing how you address this, especially the placeholder portion!
Describe the bug If you're using the MySQL integration of the plugin, everything it does is done synchronously on the main thread, which halts the server until it is completed. This was causing major lag spikes on every PlayerJoin event because it was updating the cache with their username. Spark Report
To Reproduce Steps to reproduce the behavior:
Expected behavior This should all be handled asynchronously away from the main thread with the use of BukkitRunnables or likewise.
Software (please complete the following information):
Additional context I've already fixed this bug on my copy, but it is behind a few git commits and drastically changes a bunch of stuff, so if I do manage to upload it to GitHub I will link it here. Otherwise, I am interested in seeing how you address this, especially the placeholder portion!