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

Wayname calculation logic recalculates line slice unnecessarily often #3576

Closed
avi-c opened this issue Sep 17, 2020 · 4 comments
Closed

Wayname calculation logic recalculates line slice unnecessarily often #3576

avi-c opened this issue Sep 17, 2020 · 4 comments

Comments

@avi-c
Copy link

avi-c commented Sep 17, 2020

The Android calculation of the current wayname was originally ported directly from the iOS logic.

mapbox/mapbox-navigation-ios#2635 tracks a performance improvement for this functionality that can be very significant for maps with many polyline segments. The Android algorithm should fix this issue as well.

I believe the corresponding code is here:

LineString stepSliceFromCurrentPoint = lineSlice(currentPoint, lastStepPoint, currentStepLineString);

The calculation of this LineSlice should be done outside of the double for-loop since it doesn't change.

@1ec5
Copy link
Contributor

1ec5 commented Sep 17, 2020

/cc @abhishek1508

@Guardiola31337
Copy link
Contributor

Where are we here? It seems a pretty straightforward fix if not already addressed.

cc @cafesilencio @abhishek1508

@Guardiola31337
Copy link
Contributor

Any updates here? @cafesilencio @abhishek1508

@cafesilencio
Copy link
Contributor

I can't find this class or similar code in 2.x. I"m going to close this since our current efforts are on 2.x.

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

5 participants