Very bad timings and low tps caused by BukkitEventDispatcher::onPlayerQuit(PlayerQuitEvent)
afroman84 opened this issue ยท 4 comments
Hi, here are the timings:
http://timings.aikar.co/?url=11850422
http://timings.aikar.co/?url=11850394
http://timings.aikar.co/?url=11850300
http://timings.aikar.co/?url=11850149
http://timings.aikar.co/?url=11850056
I'm really trying everything but no solution.
Updated from 1.8.6 spigot to 1.8.7 spigot and rolled back thinking that was the problem.
Please help, the server it is very unstable and unplayable, keeps crashing.
http://timings.aikar.co/?url=11851355
:( i tried also latest versions of hsp, no results. I don't know why this is changed so bad, i tried an update of both spigot from 1.8.6 to lastest 1.8.7 and hsp to latest dev build, then rolled back when the problem come out, but it never came to work as it was before :\
The two methods with bad timings are onPlayerKick and onPlayerQuit, they both call the same common method:
Two things are happening in this method: it's looking up the player object, usually very fast because it's a read operation and the underlying mechanics for both EBEANS and YAML operate similar in that they cache data for reads. The second thing is it is writing out: in YAML in particular, I've seen write operations sometimes take a long time. If you're using an external MySQL database, that's possibly a culprit also.
The easy test for both of these, as you can see from the code, is to disable RecordLastLogoutLocation in the config file (core.recordLastLogout: false). Changing that setting should fix whatever lag you are seeing because at that point, kick/quit are practically equivalent to a NO-OP for HSP.
Will Disabling the record last location make players rejoin at their home instead of their last location? No it doesn't (i tried).
I disabled first recordlastlocation and then recordlastlogout, after this last edit the timings seems normal but I'm going to wait the players this day to test if everything is normal.
Yes I'm using ebeans, should I change to something different to increase performance? And if it is the case, how could I export and import the current ebeans database?