Skip to content

Memory optimisation: deduplicate identical AdjacentNodes.offsets arrays #334

@mpollmeier

Description

@mpollmeier

In large graphs we're wasting ~8% of the heap for duplicate arrays in AdjacentNodes.offsets.
That array is only ever mutated in AdjacentNodes.setOffset in a very constraint and straighforward way, so we could easily optimise it.

E.g. we could have a global TIntObjectMap as a cache that maps from the checksum of a given offset array to the array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions