netty pooled vs unpooled ByteBuf
作者:互联网
Whats the difference between Pooled vs Unpooled and Direct vs Heap in ByteBuf?
Like , what does pooled means in context of a message received , because object like HttpRequest is created from ByteBuf in one of HttpRequestDecoder and then released in last handler of pipeline ? Whats pooled memory in this case? How memory management will differ for pooled vs unpooled ?
The difference is that with unpooled Netty will allocate a new buffer everytime you call ByteBufAllocator.buffer which comes with some overhead, especially with direct buffers. When you use pooled Netty will try to pool the buffers and so minimize the overhead of allocation and releasing of buffers.
标签:netty,pooled,unpooled,will,vs,ByteBuf,buffers 来源: https://www.cnblogs.com/CreatorKou/p/11663610.html