overflowdb icon indicating copy to clipboard operation
overflowdb copied to clipboard

Memory optimisation: create less-sparse arrays in `AdjacentNodes.nodesWithEdgeProperties` for large graphs

Open mpollmeier opened this issue 3 years ago • 0 comments
trafficstars

In large graphs we're wasting almost 10% of the heap for null-entries in AdjacentNodes.nodesWithEdgeProperties - that's the Object[] which holds refs to all adjacent nodes (a.k.a. dummy edges) and the edge properties. For some scenarios, 65% of the entries are null.

It's growth function is rather simplistic and isolated in NodeDb.growAdjacentNodesWithEdgeProperties, and can therefor hopefully be easily optimised.

mpollmeier avatar Oct 28 '22 08:10 mpollmeier