Closed Restland closed 3 years ago
Hello. Thank you for giving me a snippet of a timings report. However due to the architecture of the plugin, it is virtually useless and leads to more harm than good if I were to try to find the cause. Instead, it would be good to give me a spark (or any other semi-decent profiler/sampler) report as it allows me to see the exact origin of the lag.
I hope you understand
What exactly do you want me to send? Thanks in advance.
Basically, install the spark plugin (if you haven't already), then do /spark profiler
and after a while (just a few minutes) /spark profiler --stop
(bonus points if you are in a currently low-TPS situation as that will increase the chance of finding something).
Then you will get a link like https://spark.lucko.me/InZzonmHwh (very similar to the usual timings). Since spark exposes some data that you don't want to get exposed, it is also valid on clicking on view: all
to get to the sources view and uncollapsing the entries where enchantmentsPlus is responsible and screenshotting that to send it here
Alright will do that tomorrow with the daily restart there are tons of people online right now so I don't want to do an emergancy maintance. Thank you. Will provide all the spark timings tommorow.
understandable.
Hope that helps, if you need more let me know!
It would be best if you were to uncollapse the largest source recursively until the call tree becomes too large. Right now I have little knowledge of what the original cause is
Ah I can work with that. Would be nice if you were to uncollapse the tracer entries a few more times, as otherwise I might fix the "wrong" mistake
I edited it.
Okay, that will be a bit harder to resolve. I'll see what I can do however
let me know what else can I do to fix the issue aswell. My server is hosted with Minehut and I can't update the plugin whenever I can they have to do it so. Thanks!
Sadly there isn't much you can do. And looking at the problematic code I don't think that it will be easy to fix for me (and will require testing as the fix will likely involve reducing the frequency at which the tracer method is called). One thing you can do however is to reduce the power of the tracer enchantment or to remove it entirely.
How much power would you suggest?
No idea to be honest. I can give the tip that halving it should make the lag a quarter less potent (to some degree, the range is increased by 2 later on).
Currently the formula for the range (radius) is Math.round(level * power) + 2
- the higher it is the more lag there should be
Thank you so much. The power was 4 I lowered it to 2 hopefully that will fix the issue.
oh yeah, that explains to why you have such issues with it. Still going to optimize the method though
I never changed it tho, pretty bazaar. Thanks again.
then your probably changed the max level
You are right. I change the power to 0.3 now , it was 1.
After the latest update I have some issues with the TPS