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

Add an option to set time limit for route extraction #104

Merged
merged 3 commits into from
Oct 16, 2024

Conversation

kmaziarz
Copy link
Contributor

Our route extraction utilities can behave very differently depending on the structure of the underlying graph, and thus it's hard to predict how long extracting a given number of routes will take. In some cases, even the time between yielding one route and the next can be quite substantial. To allow for more control over route extraction, this PR adds a max_time_s argument to those utilities, which can be used to cap the total time spent. This time constraint is enforced in every iteration (as opposed to on every route found), which allows for following the limit much more closely.

Copy link
Collaborator

@AustinT AustinT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good feature to have Kris- route extraction hanging for long periods of time is really frustrating. Thanks for adding this!

@kmaziarz kmaziarz merged commit eb2ed8f into main Oct 16, 2024
5 checks passed
@kmaziarz kmaziarz deleted the kmaziarz/route-extraction-time-limit branch October 16, 2024 10:52
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

Successfully merging this pull request may close these issues.

2 participants