-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Optimise path distance calculation in MLD map matching #6876
Conversation
9456fb3
to
25019cf
Compare
@@ -650,11 +650,38 @@ double getNetworkDistance(SearchEngineData<Algorithm> &engine_working_data, | |||
return std::numeric_limits<double>::max(); | |||
} | |||
|
|||
std::vector<PathData> unpacked_path; | |||
BOOST_ASSERT(unpacked_nodes.size() >= 1); |
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.
I believe we could do similar optimisation for CH, but let's go step by step...
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.
For my understanding, there are two changes?
- Remove unnecessary annotations irrelevant to distance calculation.
- Use pre-calculated distances
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.
Yes, I think so
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.
Actually I think we can make much deeper optimization here: use 1 to N routing algorithm in map matching instead of running getNetworkDistance N times, but let's go with small steps...
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.
Just one minor suggestion.
@@ -650,11 +650,38 @@ double getNetworkDistance(SearchEngineData<Algorithm> &engine_working_data, | |||
return std::numeric_limits<double>::max(); | |||
} | |||
|
|||
std::vector<PathData> unpacked_path; | |||
BOOST_ASSERT(unpacked_nodes.size() >= 1); |
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.
For my understanding, there are two changes?
- Remove unnecessary annotations irrelevant to distance calculation.
- Use pre-calculated distances
Co-authored-by: Michael Bell <[email protected]>
Issue
Benchmark
I used this benchmark - it is the best what we have now :)
Before
After
Tasklist
Requirements / Relations
Link any requirements here. Other pull requests this PR is based on?