WolfyScript / CustomCrafting-Wiki

Wiki and JavaDocs for CustomCrafting
https://www.spigotmc.org/resources/55883/
9 stars 3 forks source link

Lag caused by custom crafting #39

Open davidotno opened 3 years ago

davidotno commented 3 years ago

Describe the bug When a player is crafting anything on the crafting table, the server TPS go down. Expected behavior I would expect a performance loss but not like what I am experiencing.

Server (please complete the following information):

Additional context https://timings.aikar.co/?id=28ce2d458e3d4e27aeec57e020efc6a3

WolfyScript commented 3 years ago

That is a lot of lag indeed. I am aware that the current algorithm isn't as optimized, and I started working on a new one last month, but it still takes some time. Current tests concluded that this new system will be up to 2x faster when putting items into the grid and up to 6x faster when taking out the result. (Of course, these might vary IRL) So I am working on improving it.

davidotno commented 3 years ago

will it help if I put more netty threads to the server? I have 4 that its the default

WolfyScript commented 3 years ago

No, it is independent of netty. What you could do is make sure that only the necessary recipes can be mirrored. By default, all recipes can be mirrored horizontally, disabling it for all the recipes that don't require it should help. options

davidotno commented 3 years ago

ohh, I will do that, thanks 😄

RhythmicSys commented 3 years ago

Am also having this issue- just thought I'd put this here in case it's of any use https://timings.pl3x.net/?id=35d8c8d546cb45feb38edebdbfcdd42f#plugins

This applies to normal vanilla recipes as well, does not matter what is being crafted, whether it is custom or not. I have made most of my recipes able to be flipped and if possible, shapeless entirely :3 (I was just crafting sea lanterns with this timings report, none of my custom recipes share those ingredients)