ProtocolLib

3M Downloads

LAG PROBLEM PROTOCOLLIB

giantfurkii opened this issue · 5 comments

commented

This is less of an issue with ProtocolLib, more of an issue with the plugins which registered packet listeners through ProtocolLib

commented

What about the first one under InteractionVisualizer in source? I'm not sure what I could do to make it take less execution time, except not sending the packet at all. Most of the percentage seems to be inside ProtocolLib method calls.

commented

the injector should be cached after joining the server - did a quick test just now and it works for me as expected

commented

Honestly I'm not facing this performance problem myself. I just redirected them to here for the above reason to see maybe I can gather more intel on where the issue is. If there are any, that is.

The method in question from InteractionVisualizer creates a teleport packet on an async thread and only does the sending part in sync.

https://github.com/LOOHP/InteractionVisualizer/blob/d1aeadc09b2c38ddb86d843fd786814484eaae9f/src/main/java/com/loohp/interactionvisualizer/protocol/ServerPacketSender.java#L85

commented

Already saw that code... Still suprised as the injection factory should be cached and therefore these lookups shouldn't happen at all 🤔