<div>Hello Aleksey,<div><br></div><div>Internally, FrameDecoder moves the content of the buffer, so we cannot simply slice the buffer. &nbsp;For optimal performance, you might want to merge ProtubufVarint32FrameDecoder and ProtobufDecoder into a single decoder class.</div><div><br></div><div>HTH</div></div>
                <div><br>--&nbsp;<br><a href="http://gleamynode.net/">Trustin Lee</a><br></div>
                 
                <p style="color: #A0A0A8;">On Wednesday, August 10, 2011 at 2:30 AM, Aleksey Yashchenko wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div>Hello ALL,<div><br></div><div>netty samples use&nbsp;ProtobufVarint32FrameDecoder &amp; Co classes to decode several protobuf messages within one packet. These helpers store VarInt before each message for this purpose. I've just found that they make a separete copy of input ChannelBuffer on each decode() instead of using buffer.slice(). Literally:</div>
<div><br></div><div><font face="'courier new', monospace">return buffer.readBytes(length)</font></div><div><br></div><div>Is there any special idea behind this?</div><div><br></div><div>Thanks!<br clear="all">
<br>~Leha<br><br>
</div>
</div><div>_______________________________________________<br>netty-users mailing list<br><a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/netty-users">https://lists.jboss.org/mailman/listinfo/netty-users</a><br></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>