square/otto — pull request #91 by beworker (2013-08-02 18:59:57+00:00)
Title: Complete code refactoring for performance improvement.

Here is a list of changes:
- Collections from java.util.concurrent were avoided, where possible
- HashSets were replaced by ArrayLists, where applicable
- Cache were moved to a single HandlerRegistry class
- ObjectPool was introduced for EventWithHandler classes for better reuse
- Single ThreadEnforcer was added
- JUnit tests were improved to not rely on the order of events anymore
- ConcurrentModificationTest case was added

StressTest results: 1.351 sec (before refactoring), 0.838 (after refactoring) on my Mac.

p.s. Although I tried to touch what was really needed only, Eclipse formatted the code. It caused many deletions and additions. Sorry for that.