Skip to content
Prev Previous commit
Next Next commit
fix: pre-size structures
  • Loading branch information
daniel-mohedano committed Mar 30, 2026
commit 51cb4ceb39d540a636c935f999b35a7a4675656e
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ public RepoIndex getIndex() {
roots[e.getValue()] = e.getKey();
}

Map<String, List<String>> duplicateTrieKeyPaths = new HashMap<>();
Map<String, List<String>> duplicateTrieKeyPaths = new HashMap<>(duplicateSourceRootIndices.size() * 4 / 3);
for (Map.Entry<String, List<Integer>> entry : duplicateSourceRootIndices.entrySet()) {
String key = entry.getKey();
List<String> paths = new ArrayList<>();
List<String> paths = new ArrayList<>(entry.getValue().size());
for (int idx : entry.getValue()) {
RepoIndex.SourceRoot sr = roots[idx];
paths.add(sr.resolveSourcePath(key));
Expand Down