Lag spike on player join
Adaf5589 opened this issue ยท 5 comments
There is a very momentary lag spike when a player joins. It is more significant when it is a new player. According to my timings report, seems like ProtocolLib is causing a lot of issues. Could be a culprit.
Not 100% sure if Protocol is the culprit, but sure looks like its taking up a major process.
Yeah its so odd. I tried diagnosing with every plugin but I can't find the source of the issue. I have a sneaking suspicion it is Premium Vanish, since on default timings report (not spark) it says PremiumVanish is responsible for "loginevent" or something. I'm not very versed with packets etc.
I assume I contact the plugin developer directly. Is there anything on Protollib end to do/optimize?
I'd say its more likely that its a plugin utilizing Protocollib. Ran it on a server that had 20-30 players join at once and had no issue. Read more into the stack traces.
The way I'd recommend thinking about how ProtocolLib works is that it's sort of like how Bukkit allows plugins to listen for and fire events, but for packets. The Bukkit event handler code shows up as a big hog on the timings but in reality it's just enabling a plugin's functionality. Your likely culprit is another plugin that uses PL to send packets when a player joins
Could you please provide the link to the spark report instead of a screen screenshot that might make it possible to find the culprit.
Sure, sorry ab that. https://spark.lucko.me/WSxl1VgRfY