-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add parameters to limit number of settled nodes during preparation, much faster preparation for certain graphs #37
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
/// calculated for all nodes initially. Since this does not take much time normally you should | ||
/// probably keep the default. | ||
pub max_settled_nodes_initial_relevance: usize, | ||
/// The maximum number of settled nodes per witness search performed when updating priorities |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These explanations are great, thank you! I kind of want to ask for something similar for hierarchy_depth_factor
and edge_quotient_factor
-- would users ever want to deviate from defaults?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I added some documentation for these as well. I also ran some measurements for varying values of hierarchy_depth_factor
, see here: https://gist.github.com/easbar/a7980e834206b6065e848ba29e228fdd#hierarchy-depth-factor
For the abstreet maps you sent reducing hierarchy_depth_factor
from 0.1
to 0.01
might actually reduce preparation times further (but also might yield somewhat slower queries, ~10% according to these experiments, but that could also just be noise).
Hm, strange. I might also check if the graphs are strongly connected. I agree that looking at your reachability debugger 25% of failed paths are unexpected.
I'm glad to hear this. Note that for your maps I think
Yes, a set of realistic edits would be helpful to analyze this further for sure. |
Fixes #34.
Long story short: When there are large-weight edges the preparation time can become much slower because witness searches explore too many nodes. Preventing this and still not adding too many shortcuts is non-trivial, so this PR introduces some parameters that can be used to tune performance depending for different types of graphs. It also provides some default values that should work reasonably well in most cases.
todo:
lib.rs
and maybe further tune parameters