Memory optimisation: create less-sparse arrays in `AdjacentNodes.nodesWithEdgeProperties` for large graphs
mpollmeier opened this issue · 0 comments
mpollmeier commented
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.