Skip to content

dont check restrictions when there are none#2539

Closed
kevinkreiser wants to merge 3 commits intomasterfrom
less_restriction_checking
Closed

dont check restrictions when there are none#2539
kevinkreiser wants to merge 3 commits intomasterfrom
less_restriction_checking

Conversation

@kevinkreiser
Copy link
Copy Markdown
Member

this is a slightly performance improvement to avoid looking at restriction information when we already know there shouldnt be any for your mode of travel. this has been a "bug" for a long time.

the previous code said, if there are any restrictions on this edge lets check for which ones match our mode. but we can shortcut this and quickly say, using the mask, whether or not there should be any restrictions for the mode we are interested it. this should mildly benefit routes on data that has a lot of restructions for modes of travel that arent subject to those restrictions

dnesbitt61
dnesbitt61 previously approved these changes Aug 18, 2020
Copy link
Copy Markdown
Member

@dnesbitt61 dnesbitt61 left a comment

Choose a reason for hiding this comment

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

2 small things:
restriction spelled wrong in the comment.
perhaps change auto_type to mode or travel_mode as auto_type makes me think this only impacts automobiles.

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