You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Above you can see the plugin taking 20-25% of all server CPU time. That's versus .5% to 1% for other plugins.
More specifically this bit:
Probable cause:
Probably you're not calling chunk.load(), but you're doing something like world.getblockat() which causes a chunk to be loaded, and the server main thread stops doing everything else while that chunk loads up from disk.
Suggestion:
If you call the paper API's async method instead, you can say like "load this in the background, and when it's done, then run this other code that needs the chunk". Using that API does NOT mean your plugin will only work on Paper servers, it will continue to work same as it does today on spigot and craftbukkit but Paper servers will go super duper fast again.
Alternately, you might find that you don't really need to load a chunk at all for whatever it is you're doing in StructurePicker, or you might find a way to run this StructurePicker task less frequently for less overall impact.
The text was updated successfully, but these errors were encountered:
Timings Report:
https://timings.aikar.co/dev/?id=4c90887539aa420fa5dd3f9040d8e3a9
Above you can see the plugin taking 20-25% of all server CPU time. That's versus .5% to 1% for other plugins.
More specifically this bit:
Probable cause:
Probably you're not calling chunk.load(), but you're doing something like world.getblockat() which causes a chunk to be loaded, and the server main thread stops doing everything else while that chunk loads up from disk.
Suggestion:
If you call the paper API's async method instead, you can say like "load this in the background, and when it's done, then run this other code that needs the chunk". Using that API does NOT mean your plugin will only work on Paper servers, it will continue to work same as it does today on spigot and craftbukkit but Paper servers will go super duper fast again.
https://jd.papermc.io/paper/1.19/org/bukkit/World.html#getChunkAtAsync(org.bukkit.Location)
https://papermc.io/using-the-api
Alternately, you might find that you don't really need to load a chunk at all for whatever it is you're doing in StructurePicker, or you might find a way to run this StructurePicker task less frequently for less overall impact.
The text was updated successfully, but these errors were encountered: