dominikbraun / graph

A library for creating generic graph data structures and modifying, analyzing, and visualizing them.
https://graph.dominikbraun.io
Apache License 2.0
1.8k stars 94 forks source link

In-memory store: Store edge properties only once #110

Open dominikbraun opened 1 year ago

dominikbraun commented 1 year ago

At the moment, the built-in in-memory store implementation that satisfies the Store interface stores the edge properties multiple times: In outEdges and in inEdges, because both store full Edge[K] instances.

This isn't memory-efficient for edges that store a lot of data. Therefore, it might make sense to only store the actual Edge instances or at least their properties once, maybe in a separate map, and retrieve this data when returning an edge.