Unnecessary copy?
Bill Burke
bburke at redhat.com
Mon Oct 17 18:52:17 EDT 2011
I'm looking at the code for NioWorker.read(). I notice that a
ChannelBuffer is created, then the underlying ByteBuffer is copied into
this ChannelBuffer via the buffer.setBytes(0, bb); call.
Why isn't a wrapped ChannelBuffer created around the ByteBuffer? Any
reason why the whole NIO ByteBuffer is copied?
Thanks
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
More information about the netty-users
mailing list