-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
waiting for teamAn issue we need members of the team to reviewAn issue we need members of the team to review
Description
The CompositeCounter stores its 'children' in an IdentityHashMap. Consider using a different data structure, or if necessary, two data structures for this use case.
I am working on a high-performance application with many updates to the counters. From a recent Java Flight Recording, I noted that my application had generated 50GB on heap of Iterators from this class during a test run. Consider keeping an ArrayList of children (in addition to / instead of) a Map such that accessing the Collection of children becomes a heap-free operation.
Lines 31 to 33 in 2d9abb2
| for (Counter c : getChildren()) { | |
| c.increment(amount); | |
| } |
Metadata
Metadata
Assignees
Labels
waiting for teamAn issue we need members of the team to reviewAn issue we need members of the team to review