-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
P4
-
Affects Version/s: 8, 9
-
Component/s: tools
Our closureCache at Types is implemented using our List:
private Map<Type,List<Type>> closureCache = new HashMap<>();
so there is a map from a type to a sorted list of types. I think that a linked list is not the best data structure to implement a list that should be sorted. Depending on the use cases a balanced tree, a plain java.util.ArrayList or a heap should be way better. I agree that if there is no performance slowdown, comparing the current implementation with all the alternatives, we can keep the implementation as it is.
private Map<Type,List<Type>> closureCache = new HashMap<>();
so there is a map from a type to a sorted list of types. I think that a linked list is not the best data structure to implement a list that should be sorted. Depending on the use cases a balanced tree, a plain java.util.ArrayList or a heap should be way better. I agree that if there is no performance slowdown, comparing the current implementation with all the alternatives, we can keep the implementation as it is.