Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
public final Map<String, LightWeightLinkedSet<Block>> excessReplicateMap = new HashMap<>();
LightWeightLinkedSet extends LightWeightHashSet and in addition it stores elements in double linked list to ensure ordered traversal. So it requires more memory for each entry (2 references = 8 + 8 bytes = 16 bytes, assume 64-bits system/JVM).
I have traversed the source code, and we don't need ordered traversal for excess replicated blocks, so could use LightWeightHashSet to save memory.