From 9f45cf11a30130dd904336de618833d1fe8b84d6 Mon Sep 17 00:00:00 2001 From: themode Date: Fri, 20 Nov 2020 05:50:52 +0100 Subject: [PATCH] Added todo to optimize buffer allocation --- src/main/java/net/minestom/server/utils/PacketUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/net/minestom/server/utils/PacketUtils.java b/src/main/java/net/minestom/server/utils/PacketUtils.java index d8d99d82e..c40933f43 100644 --- a/src/main/java/net/minestom/server/utils/PacketUtils.java +++ b/src/main/java/net/minestom/server/utils/PacketUtils.java @@ -152,6 +152,7 @@ public final class PacketUtils { private static ByteBuf createFramedPacket(@NotNull ServerPacket serverPacket) { ByteBuf packetBuf = writePacket(serverPacket); + // TODO use pooled buffers instead of unpooled ones if (MinecraftServer.getCompressionThreshold() > 0) { ByteBuf compressedBuf = Unpooled.buffer();