Skip to content

Commit 3ef7207

Browse files
author
Peter
committed
reduce RAM usage in tarjan algorithm via trimToSize
1 parent 88806c2 commit 3ef7207

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/main/java/com/graphhopper/routing/util/TarjansStronglyConnectedComponentsAlgorithm.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ private void strongConnect( int firstNode )
123123
onStack.clear(node);
124124
}
125125
component.add(start);
126+
component.trimToSize();
126127
onStack.clear(start);
127128

128129
components.add(component);

0 commit comments

Comments
 (0)