40000+ node layout, out of memory
I use java run 40000+ node layout
"contentAlignment": "[V_CENTER]",
"edgeRouting": "ORTHOGONAL",
"org.eclipse.elk.hierarchyHandling": "INCLUDE_CHILDREN",
"org.eclipse.elk.layered.layering.strategy": "NETWORK_SIMPLEX",
"separateConnectedComponents": true,
"spacing.componentComponent": 80,
"spacing.edgeEdge": 20,
"spacing.edgeEdgeBetweenLayers": 20,
"spacing.edgeNode": 50,
"spacing.edgeNodeBetweenLayers": 40,
"spacing.nodeNode": 80,
"spacing.nodeNodeBetweenLayers": 152
I run in java, use BasicProgressMonitor
final BasicProgressMonitor pm = new BasicProgressMonitor();
new RecursiveGraphLayoutEngine().layout(elkGraph, pm);
java vm options:
-Xms512m -Xmx8192m -Xmn4096m -Xss4m
and then out of memory
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
Why do you need hierarchyHandling: INCLUDE_CHILDREN? Do you have edges that cross hierarchy levels? Have you considered introducing these edges explicitly by splitting them with ports since this vastly reduces the complexity. If you have 40000 nodes, I do not think that you require the capabilities for crossing minimization across hierarchies this option provides.
Could you please provide me with the graph such that I could investigate what phases causes this error?
Another option is to try simpler options for all layout phases. Generally, I could however say that the layered algorithm not always perfect to layout very big graphs. What is the nature of these graphs? Do you actually require a complex layout considering alignment and edge crossings or are you just using this to get coordinates that could be trivially computed? I.e., do you know where these nodes should be placed beforehand?