reactor/reactor — pull request #269 by ifesdjeen (2014-01-30 17:28:59+00:00)
Title: Add Event Allocator

Currently only Task objects are pooled. After profiling our application, we've found
GC contention related to Event objects, which were generated at high rates, and
causing long GC pauses every 5-6 seconds.

Polling Event objects helped us to avoid it. In combination with Task object pooling
(especially well seen on RingBufferDispatcher), Event object pooling will significantly
improve a memory snapshot and provide many possibilities for flexible object
creation / reuse.

As per conversation with Jon, we agreed that we'll provide an unobtrusive way to
allocate events based on generic interface and recycle them as needed, but will
not provide it as a default, since it may make quite difficult for people just wanting
to start working with project as soon as possible to figure out potential resource
leaks.

This is a simple, "reference" implementation of Event Allocator.