Closed Webman97 closed 4 years ago
My entire multi-world server lags when this plugin is used under the following parameters:
- Joining a match after server restart (longest lag spike)
- Switching from Joining to Waitroom
- Switching from Waitroom to Game
- Switching from Game to Leaving
Are there performance tweaks I can make to have the above disappear completely? I'd like my players to experience zero lag between games, but I dont want to set up another server dedicated to this plugin.
======================================= If the above is not possible, another solution may be to add an enhancement - maybe some form of session buffering? The best example of this that's actually in practice is WorldEdit vs AsyncWorldEdit - WorldEdit provides the functionality while AsyncWorldEdit prevents the entire server from crashing/lagging/etc.
In the context of this plugin, that functionality may look something like this: A player joins a game lobby and gets the following message: "Generating Session". Instead of the whole server lagging, the job is buffered and sends the message "Session Generated" when completed.
Thoughts?
This has to do with the current scoreboard code, which unfortunately is not the best. I've tried many different methods to optimize it, but ultimately as far as I can tell, it'll require a rewrite of the whole system, which we are planning on doing in the rewrite of the plugin anyway. For the time being, you can disable the scoreboard to get rid of these performance issues, and if it's important that you have one, you can use any scoreboard plugin with PlaceholderAPI support as an alternative as BattleArena has support for PlaceholderAPI.
This has to do with the current scoreboard code, which unfortunately is not the best. I've tried many different methods to optimize it, but ultimately as far as I can tell, it'll require a rewrite of the whole system, which we are planning on doing in the rewrite of the plugin anyway. For the time being, you can disable the scoreboard to get rid of these performance issues, and if it's important that you have one, you can use any scoreboard plugin with PlaceholderAPI support as an alternative as BattleArena has support for PlaceholderAPI.
That's fantastic news! Thank you!
I'll confirm disabling the scoreboard works before closing this issue out.
@RednedEpic This resolved the issue - thank you!!
My entire multi-world server lags when this plugin is used under the following parameters:
Are there performance tweaks I can make to have the above disappear completely? I'd like my players to experience zero lag between games, but I dont want to set up another server dedicated to this plugin.
======================================= If the above is not possible, another solution may be to add an enhancement - maybe some form of session buffering? The best example of this that's actually in practice is WorldEdit vs AsyncWorldEdit - WorldEdit provides the functionality while AsyncWorldEdit prevents the entire server from crashing/lagging/etc.
In the context of this plugin, that functionality may look something like this: A player joins a game lobby and gets the following message: "Generating Session". Instead of the whole server lagging, the job is buffered and sends the message "Session Generated" when completed.
Thoughts?