netty/netty — pull request #2453 by normanmaurer (2014-05-02 11:54:37+00:00)
Title: Minimize memory footprint of HashedWheelTimer and context-switching

Motivation:
At the moment there are two issues with HashedWheelTimer:
* the memory footprint of it is pretty heavy (250kb fon an empty instance)
* the way how added Timeouts are handled is inefficient in terms of how locks etc are used and so a lot of context-switching / condition can happen.

Modification:
Rewrite HashedWheelTimer to use an optimized bucket implementation to store the ssubmitted Timeouts. The used datastructure is moduled after a linkedlist with a multi-producer / single-consumer pattern in mind. So volatile writes are reduced to a minimum and also the memory foot-print of the buckets itself is reduced a lot. Beside this we use Atomic*FieldUpdater where-ever possible to improve the memory foot-print and performance.

Result:
Lower memory-footprint and better performance