Skip to content

Flush packets async#2845

Closed
Spottedleaf wants to merge 2 commits into
PaperMC:masterfrom
Spottedleaf:flush-packets-async
Closed

Flush packets async#2845
Spottedleaf wants to merge 2 commits into
PaperMC:masterfrom
Spottedleaf:flush-packets-async

Conversation

@Spottedleaf
Copy link
Copy Markdown
Member

Apparently sendPacket took 50% of the timings for entity tracker
update, so offload that to the packet flusher thread.

Apparently sendPacket took 50% of the timings for entity tracker
update, so offload that to the packet flusher thread.
@xxDark
Copy link
Copy Markdown

xxDark commented Jan 13, 2020

Would suggest to make thread to use wait/notify to awake it.
btw there we have it another thread is running just to flush packet queue, so also would suggest to allow to disable it

@Spottedleaf
Copy link
Copy Markdown
Member Author

I've a better idea in mind

@jiongjionger
Copy link
Copy Markdown

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.
@Spottedleaf

@electronicboy
Copy link
Copy Markdown
Member

Have you tested this PR or? I don't believe that that would be an issue due to how the pipeline is handled

@Spottedleaf
Copy link
Copy Markdown
Member Author

todo: do not add to packet queue if we're in event loop

@Spottedleaf
Copy link
Copy Markdown
Member Author

conflicts with protocollib pretty hard

@y6x2digc
Copy link
Copy Markdown

we can make a PR for protocollib

@Toffikk
Copy link
Copy Markdown
Contributor

Toffikk commented Aug 2, 2020

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants