-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
releasedtriage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
NonHierarchicalDistanceBasedAlgorithm calls StaticCluster#remove when re-clustering candidates:
Line 212 in 862db8c
| itemToCluster.get(clusterItem).remove(clusterItem.mClusterItem); |
StaticCluster internally stores the items in a ArrayList
android-maps-utils/library/src/main/java/com/google/maps/android/clustering/algo/StaticCluster.java
Line 32 in 862db8c
| private final List<T> mItems = new ArrayList<T>(); |
A low-hanging fix is to change the container from ArrayList to HashSet (or LinkedHashSet if ordering matters)
Metadata
Metadata
Assignees
Labels
releasedtriage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.