Closed Marcuri02 closed 3 years ago
Hey, why do they say its PreciousStones? Could be, im not the author so Im not 100% familiar with what this plugin does. But your timings doenst show any big issue, or at least I cant see it
I think it is. With version 1.3 it’s going fine, but 1.4 lags. Where I can talk with the author and report that?
Version 1.4 didnt have any changes that could make lag, just bug fixes, so it should also be with older versions...
The author left the plugin ages ago, Nathan and me are helping to fix issues with it. So well, in those timings I cant see the problem with PS, and all the updates I made didnt add content so it is not possible that the latest one is causing lag but the one before doesnt
The problem it seems is that PreciousStones is using player.teleport. However, this method forces the destination chunks to be loaded immediately and thus synchronously, voiding the opportunity to take advantage of multithreaded chunk loading.
This can be solved by using PaperLib and refactoring player.teleport calls to use PaperLib.teleportAsync and running the following logic inside the callback.
Here is how it is known that PreciousStones is triggering sync chunk loads.
Got you, thanks a lot for the additional information @A248 , it was really helpful!
I will label this as an enhancement rather than a bug because as A248 told, this seems more than a spigot issue (which is our main API) rather than a plugin one (maybe Im wrong)
If anyone wants to make a PR to add this enhancement feel free, the main objective is to also keep compability with spigot so it must work with both. When I have time, Ill have a look into how to add this (as I have never added any custom paper stuff into a plugin)
Lag issues solved thanks to @A248
Hello, I write here because I'm having sooo lag on my server and the boys of the Discord of PaperMC tell me:
This are my timings: https://timings.aikar.co/?id=65d0298f72e04e0b840e72d154f38800
Thanks.