-
Notifications
You must be signed in to change notification settings - Fork 93
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
Foreign JSON members roundtrip #669
Conversation
Sources/MapboxDirections/Extensions/ForeignMemberContainer.swift
Outdated
Show resolved
Hide resolved
|
||
// https://github.com/mapbox/mapbox-directions-swift/issues/125 | ||
var referenceStepJSON = stepJSON | ||
referenceStepJSON.removeValue(forKey: "weight") |
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.
This is now covered by the new feature!
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.
#125 still tracks formal support for this property, but it’s great that we can at least allow developers to access the data.
…MemberContainerClass
…h parsed ref and name; Unit tests updated
…rContainer conformance; extended V5Tests timeout
148e227
to
f4d02db
Compare
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.
This looks good to me, other than probably needing to bring back the ref-in-name code for now. The performance issue is significant but scoped such that we can treat it as tail work if necessary.
…; CHANGELOG appended; tests fixed.
I've tried disabling foreign members coding in Turf to measure performance hit (using this mechanism) but it still slowed down the coding significantly. Probably need to find another approach... |
Can we narrow the performance penalty down to a particular property or object in the response? For example, what if the response lacks annotations, which already cause the leg to be doubly decoded even before this change? |
…ainer conformance to avoid duplicate members coding. Reverted unit test timeout value.
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.
Hopefully eliminating protocol conformance for the union
-style redecoding structs will mitigate the performance hit to an acceptable degree.
…rmance from IntersectionShapeIndex and AdministrativeAreaIndex
Resolves #637
This PR utilizes
Turf.ForeignMemberContainer
and it's analog for reference types:ForeignMemberClassContainer
.Revisiting types, related to processing various responses from the Directions API, found and refactored some outdated coding logic.