netty5/buffer
Norman Maurer 35c7f66c48 MessageToByteEncoder always starts with ByteBuf that use initalCapacity == 0
Motivation:

MessageToByteEncoder always starts with ByteBuf that use initalCapacity == 0 when preferDirect is used. This is really wasteful in terms of performance as every first write into the buffer will cause an expand of the buffer itself.

Modifications:

 - Change ByteBufAllocator.ioBuffer() use the same default initialCapacity as heapBuffer() and directBuffer()
 - Add new allocateBuffer method to MessageToByteEncoder that allow the user to do some smarter allocation based on the message that will be encoded.

Result:

Less expanding of buffer and more flexibilty when allocate the buffer for encoding.
2014-06-24 13:55:34 +09:00
..
src MessageToByteEncoder always starts with ByteBuf that use initalCapacity == 0 2014-06-24 13:55:34 +09:00
pom.xml [maven-release-plugin] prepare for next development iteration 2013-12-22 22:06:15 +09:00