#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