Flush packets async#2845
Conversation
Apparently sendPacket took 50% of the timings for entity tracker update, so offload that to the packet flusher thread.
|
Would suggest to make thread to use wait/notify to awake it. |
|
I've a better idea in mind |
|
Good idea. But you need to avoid sending the PacketPlayOutKickDisconnect asynchronously, otherwise when the player is kicked out of the server, the kickout screen will not be displayed until the times out. |
|
Have you tested this PR or? I don't believe that that would be an issue due to how the pipeline is handled |
|
todo: do not add to packet queue if we're in event loop |
|
conflicts with protocollib pretty hard |
|
we can make a PR for protocollib |
|
@Spottedleaf Why don’t You re-open it , because if it is necessary we could make a PR for protocollib EDIT: Sorry for bad grammar |
Apparently sendPacket took 50% of the timings for entity tracker
update, so offload that to the packet flusher thread.