[英]Why Netty's CompositeByteBuf consolidates automatically if the number of components in CompositeByteBuf exceeds 'maxNumComponents'
I'm trying to understand why CompositeByteBuf, consolidates if the number of components in the compositebytebuf becomes more than 'maxNumComponents' while adding component ?我试图理解为什么 CompositeByteBuf,如果在添加组件时CompositeBytebuf 中的组件数量变得超过 'maxNumComponents' 会合并?
This consolidation involves copy operations .这种整合涉及复制操作。 My questions are -我的问题是——
It does this because once you have a lot of buffers in a CompositeByteBuf
accessing things on a specific index can for example become very slow.这样做是因为一旦CompositeByteBuf
有很多缓冲区,访问特定索引上的内容可能会变得非常慢。
If this is a problem for you or not depends highly on the use-case.如果这对您来说是一个问题,在很大程度上取决于用例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.