Open BoomEaro opened 1 year ago
This was long on the list of stuff that I wanted to look into, given that we're not rewriting this stuff, I did wanna look into adding a mechanism to literally just skip packets and let the proxy not care about them, even if registered
There's no such thing as skipping packets, you always have to check packet id. And slicing instead of copying is already a big progress. Not sure what else can be done here to optimize performance.
I mean skip the decode + handle + encode chain for unneeded packets in certain configs; if we're not rewriting entity metadata, then we can skip a bunch of work
I mean skip the decode + handle + encode chain for unneeded packets in certain configs; if we're not rewriting entity metadata, then we can skip a bunch of work
Bungee doesn't use decoding into object fields for most entity rewriting stuff.
True, but part of it was for other stuff like scoreboards, etc; it's probably not a big deal, and probs not something I'm ever going to care to get to considering the state of this project
This commit would likely break several plugins like ViaVersion that are expecting a grow-able, copied buffer. If anything, it should be made into a configurable option for the user to decide.
This commit would likely break several plugins like ViaVersion that are expecting a grow-able, copied buffer. If anything, it should be made into a configurable option for the user to decide.
Statement from someone knowing viaverson-bungee is needed. Don't want some useless config option or startup flag.
This would only theoretically occur if the option were disabled
This pull request returns the ability to slice ByteBuf when decoding a packet in the MinecraftDecoder class as it did before, but only if entity rewrite was never used. If I understand correctly, the original reason for using copy is that entity rewrite can write more bytes than is possible in the slice itself. Therefore, most likely there is no point in constantly copying bytes even when we are not going to change them.
I would like to know your opinion on this, what it could possibly break and whether it makes any sense at all, since I have not had much experience with netty yet.