-
-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lag spikes due to timer task that triggers every 6000 ticks #976
Comments
This is the full database save. You can change how often it occurs in the BentoBox config. |
Thanks for reply but I think it should be done asynchronously if it has not links with main thread to not affect performance or at least it should be done in parts to not freeze server for seconds if database is bigger. |
What database are you using? Database saves are async. Do you actually see the server freeze for seconds or is this just from the timings report? |
When it was every 5 minutes it was very annoying for players. I think simplest way to solve this problem is to split this database backup process to parts, for example schedule next part every 2000 rows (modulo 2000) and add 20 ticks to every next timed task to make this spikes be very small or just run it asynchronously because all sql databases do not require to be synchronous with main thread. |
Thanks. I'll work on improving this. SQL saving is async, but there can be improvements so the prep tasks can be written better. |
SHould be optimized now. Comments appreciated. |
BentoBox::Task: world.bentobox.bentobox.BentoBox$$Lambda$2942/1667770658 (interval:6000)
This thing generates big lag spikes everytime it triggers. Can you please optimalize it?
I think it is timed task that saves islands evey X time.
Using latest paper spigot 1.13 with bungeecord on Java 8.
If any other information will be needed then please post below.
The text was updated successfully, but these errors were encountered: