Closed FrankHeijden closed 3 years ago
You are already able to let the plugin display the expiration-time of a region as a date. Unfortunately most players want the countdown. But there is something you can do to reduce your lags. You can set the signupdateInterval in your configuration to a higher number of ticks. ARM automatically tries to distribute the workload on as many ticks as you allow. For example: If you have 80 Regions and an updateInterval of 40 ticks. ARM will only update 2 regions per tick. It follows that all regions will be updated every 2 seconds, because 40 ticks = 2 seconds. Also ARM tries to only update regions in one tick, that are not in the same chunk. That increases the probability that some regions don't even get their signs updated, because ARM only updates signs that are located in loaded chunks. The only thing that I can't optimize is the region restoring process. If a region expires and gets restored, a schematic gets loaded and pasted into the region. This may cause some lags, but shouldn't happen often.
Thanks for the quick response!
It seems that the
Region#updateSignText
method is very heavy to compute for alln
shops every second, is it maybe possible of fixing the timestamp onto the sign instead of updating the sign text each second / interval?I was thinking about a line on the sign which could just be fixed, such as "Expires At dd-MM HH:mm" or something, so the plugin doesn't need to update the signs each tick at all.