Added todo to optimize buffer allocation

This commit is contained in:
themode 2020-11-20 05:50:52 +01:00
parent 4060f8d290
commit 9f45cf11a3

View File

@ -152,6 +152,7 @@ public final class PacketUtils {
private static ByteBuf createFramedPacket(@NotNull ServerPacket serverPacket) { private static ByteBuf createFramedPacket(@NotNull ServerPacket serverPacket) {
ByteBuf packetBuf = writePacket(serverPacket); ByteBuf packetBuf = writePacket(serverPacket);
// TODO use pooled buffers instead of unpooled ones
if (MinecraftServer.getCompressionThreshold() > 0) { if (MinecraftServer.getCompressionThreshold() > 0) {
ByteBuf compressedBuf = Unpooled.buffer(); ByteBuf compressedBuf = Unpooled.buffer();