AddstarMC / BlockHunt

Block Hide And Seek plugin for the Bukkit Development. Called BlockHunt.
16 stars 22 forks source link

High lag after some times #7

Open Malachiel87 opened 9 years ago

Malachiel87 commented 9 years ago

timings report http://timings.aikar.co/?url=11749986 it just drain resource after some time, since no one is playing at moment that i recorded I am using Spigot 1.87, latest libdisguise 8.4 (is manteined again), and protocolib 3.6.3-SNAPSHOT-b111

Steffion commented 9 years ago

This is most likely like this because they way I coded it. I don't know what I was thinking while coding the plugin but I made it horrible. The only way to fix the timings, which is critical, is to recode the whole plugin.

addstar commented 9 years ago

@xion87, something is wrong with your setup or your server. Which build are you using? If you have no one in the game/arena and no one is playing, there should be almost no impact at all. I have tried to optimise the plugin as much as possible without having to completely re-write it (as @Steffion said, it really needs a full re-write).

But every event handler has an early exit if no one is in the arena and I can see it's spending time in the OnEntityDamageByEntityEvent. Also, the per-second task you see in the timings reports does very little if no one is playing - although someday will change it to only update signs when the game state changes, then it will be as efficient at possible with the current design.

Can you please confirm no players were inside any arenas at the time and there we no games in progress?