Open Shivelight opened 7 years ago
Thanks for these timings, I will try to improve performance using them. 🙂
Little suggestion that can (maybe) eliminate the lag, is to reduce the usage of PlayerMoveEvent. Maybe what I'm going to suggest need a major rewrite to implement, but I'll give a shot :3
Use stone pressure plate to trigger something, PlayerInteractEvent is not that extensive. Can be used as checkpoint, teleport, effect, start, end, give, and optional checkpoint (maybe using wooden pressure plate, so player not confused with main checkpoint). (We still need to use a sign to define something, but later replaced with respective pressure plate).
We can choose what we preffer to use, either pressure plate or fancy move event :)
Nice idea, but the problem is that only one player at a time can trigger pressure plates, so if there are several players in the same map, players may not trigger them because there is someone else standing on the pressure plate (especially on your server when there are many players playing). I am first trying to improve PlayerMoveEvent performance, but I keep your idea in mind if there is still lag. And I can add pressure plates as an option anyway, it may be useful. 🙂
I just did a test. If you cancel the event, the pressure plate will not get clicked, and keep spamming/firing the event if you stand on it.
Here is the test with 2 player on the same pressure plate - https://pastebin.com/BX34pR8Y
Ok, I did not cancel the events when I tested it. Thanks for the tip! So I will probably add pressure plates as an option.
I added pressure plates and improved performance in the new update. You can also lower the "memory dump interval" value in configuration.yml, it should improve performance too. Tell me if it is better on your server now. 🙂
The performance is actually improved but some lag spike is still there, I can't provide timings as I'm using MassiveLag to debug which code causing the lag. Here you can see the log:
onInventoryClick (When you click on map from /cp play. Always happen) https://hastebin.com/udebojebom.md
onPlayerInteract https://hastebin.com/isesocazob.md
I hope that provide you useful information ❤️
It seems that loading leaderboards takes a lot of time, I have to improve this. Creating different files for ghost data may be a solution, I will probably do it.
Any chance for mysql? I also need it for my web based players statistic.
I really want to add MySQL support, but it will take some time, not in the next update I think. 🙂
Can you add option to disable scoreboard for now?
Yes, but it will also disable ghosts, is it ok?
Not a problem 👍
I just added the "disable leaderboards" option in the last update. I will improve the file system as I mentioned before, but it will probably take some time.
No lag so far, thank you for your hardwork ❤️
First, let me thank you for this amazing plugin!
I got problem with lag spikes (about 1 sec, tps drop to 2-5) on my server, caused by PlayerMoveEvent listener. I'm not sure which part of the code tho. Not only PlayerMoveEvent, InventoryClickEvent might be the problem too.
Take a look at my timings report: https://timings.aikar.co/?id=d65d5060ba51477fb9732b71844f3003
Average player is about 20-30 at a time.