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

distance_map is extremely slow #1

Open
clbarnes opened this issue Nov 6, 2018 · 3 comments
Open

distance_map is extremely slow #1

clbarnes opened this issue Nov 6, 2018 · 3 comments

Comments

@clbarnes
Copy link
Owner

clbarnes commented Nov 6, 2018

Using networkx's shortest_path_length is extremely slow for this data; the "classic" algorithm should be much faster (but the current implementation is incorrect).

I believe that the problem with the python implementation of the classic distance_map algorithm is the sorting of the partitions. The JS docs say that they should be sorted in order of length, but I think they should actually be ordered topologically. partitions_sorted should return the root-containing partition last.

@clbarnes
Copy link
Owner Author

clbarnes commented Nov 6, 2018

the "classic" algorithm should be much faster

It's not.

@unidesigner
Copy link

I have not looked into the algo itself, so I can't tell. Maybe this is useful regarding faster implementations
https://stackoverflow.com/questions/938338/what-is-the-fastest-dijkstra-implementation-you-know-in-c
Maybe @ceesem can also comment.

@clbarnes
Copy link
Owner Author

Just a thought - this might be at least in part because the reference implementation constrains the maximum length of a path, where I'm not currently doing that in the ArborNX implementation.

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