ProtocolLib

3M Downloads

Inefficient Async Packet Processing Sequence

Ingrim4 opened this issue ยท 0 comments

commented

When a packet is intercepted, it is first processed by all sync packet listeners and then by async ones. The AsyncMarker is used to send the packets once they have been processed by all async packet listeners. After this, the process jumps back to the main thread to invoke MONITOR listeners, which might not even exist. This seems inefficient since the sync monitor listeners have already been invoked and do not require invocation again. To improve efficiency, I propose changing this behavior to always notify the injector directly once a packet is done processing.

Should improve/solve #2549