Looks like list synchronization is a factor of the performance impact.
Maybe, you can have a private time for the oldest entry so don't
access/iterate/cleanup entries list until necessary. The "at most every
minute" may be not a good strategy in some situations.
On 2/22/2018 12:36 AM, Weijun Wang wrote:
Please take a review at
1. I tried list.subList(here, end).clear() but it's not faster.
2. I have looked at ConcurrentHashMap + ConcurrentSkipListMap but will need
more time to verify its correctness and measure the performance gain. Since the
bug is reported on 8u, a safer fix looks better.