netty/netty — pull request #2789 by normanmaurer (2014-08-19 06:06:23+00:00)
Title: Allow efficient writing of CompositeByteBuf when using native epoll tran...

...sport.

Motivation:

There were no way to efficient write a CompositeByteBuf as we always did a memory copy to a direct buffer in this case. This is not needed as we can just write a CompositeByteBuf as long as all the components are buffers with a memory address.

Modifications:

- Introduce CompositeByteBuf.internalReplaceComponent(...) which allows to replace a ByteBuf in a CompositeByteBuf in an efficient way.
- Make use of internalReplaceComponent(...) to replace all ByteBuf in the CompositeByteBuf that have no memory address.
- Also handle CompositeByteBuf that have more components then 1024.

Result:

More efficient writing of CompositeByteBuf.