mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-30 14:13:47 +01:00
#3113: Remove unnecessary slice in PacketDecompressor
Thanks @lokha for the profiling and suggestion.
This commit is contained in:
parent
b7935d4b14
commit
c57bf61114
@ -31,8 +31,7 @@ public class PacketDecompressor extends MessageToMessageDecoder<ByteBuf>
|
||||
int size = DefinedPacket.readVarInt( in );
|
||||
if ( size == 0 )
|
||||
{
|
||||
out.add( in.slice().retain() );
|
||||
in.skipBytes( in.readableBytes() );
|
||||
out.add( in );
|
||||
} else
|
||||
{
|
||||
ByteBuf decompressed = ctx.alloc().directBuffer();
|
||||
|
Loading…
Reference in New Issue
Block a user