Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory optimisation: deduplicate identical AdjacentNodes.offsets arrays #334

Open
mpollmeier opened this issue Oct 28, 2022 · 0 comments
Open

Comments

@mpollmeier
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant