Netty 4.0.18.Final released
No this is not an April fool, just the truth... We are happy to announce the relase of Netty 4.0.18.Final. The release comes with a massive amount of improvements and fixes so you should consider to upgrade ASAP. In total we fixed / resolved 50 issues / tasks, so this release contains a lot of stuff.
Please read on for more details on the changes. As always this release is backwards-compatible with earlier releases of the 4.0.x series.
Most important changes / fixes
- Implement thread-local cache for PooledByteBufAllocator (#808) (#2284) (#2264)
- Write optimized Queue implementation for NioEventLoop (#1259) (#2265)
- Add ZLIB_OR_NONE wrapper support to JdkZlibDecoder (#2016) (#2269)
- NPE when using epoll transport (#2262)
- epoll transport always calls ChannelInboundHandler.channelActive(), even when connection fails (#2280) (#2292)
- Thread contention in ChannelHandlerAdapter.isSharable (#2289) (#2296)
- Shutdown fails with native epoll (#2297)
- Blocking in SingleThreadEventExecutor#startThread (#2307) (#2310)
- Blocking in SelectorProvider#provider (#2308)
- Netty 4.0.15 no longer works on Android (#2330)
- "Promise already done" warning when cancelling ChannelFuture returned by bootstrap.connect() (#2349)
Visit here for the complete list of the changes.
As always please let us know if you find any issues. We love feedback!
ThreadLocal cache for PooledByteBufAllocator
One important thing to note about this release is that it now ships with ThreadLocal based caches for PooledByteBufAllocator to reduce conditions when allocate buffers very frequently from different Threads. This brings our implementation even closer to the jemalloc implementation itself, as jemalloc uses a similar way to handle this kind of problem.
To give you some idea about the impact have a look at these different condition graphs. The first shows the conditions before the caches were added and the second with them added (with the same workload).
This change makes a big-difference in performance if you push things hard enough. For more details please check the pull-request #2284.
Every idea and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report an unintended omission.