L2J/L2J_Server — pull request #17 by nosideeffects (2014-12-30 03:32:32+00:00)
Title: Random performance related changes

Been profiling a running server the past few days to get a better understanding of how the server works (a lot easier than reading through every code file!), and applied a first batch of very simple performance enhancements. I have some pretty cool plans for some more significant reworks, but I need to make sure a lot of our manager-esque classes are adhering to Separation of Concerns before I will start those changes.

Changes in this PR:

- Use primitive collection types where appropriate for smaller memory
footprint, greater throughput, and to avoid auto-boxing allocation overhead.

- Use THashMap in place of HashMap and FastMap for all Object->Object maps
for performance (in non-concurrent code paths).

- Use ConcurrentHashMap instead of FastMap.share() in code paths that have
more accesses than modifications (faster to get() than FastMap).

- Avoid allocation of Iterators, such as looping through ArrayList
collections.

- More optimized game time movement loop using ConcurrentLinkedQueue.

- Random separation of concerns modifications.