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

Hashmap for NodeIndex <-> segment ID #16

Open
ASLeonard opened this issue Jun 30, 2023 · 1 comment
Open

Hashmap for NodeIndex <-> segment ID #16

ASLeonard opened this issue Jun 30, 2023 · 1 comment

Comments

@ASLeonard
Copy link

Hi,

I've been hacking some stuff together for a different project since this has a nice implementation of gfa->petgraph, but it was slowing down way too much for large graphs (10+ million nodes).

I didn't need as much fancy handling, so I just implemented a hashmap for NodeIndex to segment ID (and can later invert it), and the graph went from probably taking hours to load to 10 seconds or so, so that is a big improvement (I was inspired by your hint!).

/// This should 100% have been a map-like structure...

Thanks,
Alex

@Euphrasiologist
Copy link
Contributor

Hi Alex,

Thanks for the comment and taking time to use the tool. I hope the code is useful :)

If you feel like merging your HashMap implementation into my code please do! I should get around to it at some point, but always nice to have keen collaborators!

Cheers,
M

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

2 participants