You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For each shape ids, we are again looping over every entry in shapes.txt to find matching shape points. This is where the NxM blow-up and slow-down is likely coming from. Again GtfsShapeTableContainer#byShapeIdMap() already has all the shape points grouped by shape id and should be used directly.
I'd also point out that the shape points and stop points below should both probably be filtered by hasShapeDistTraveled as well.
Looking at #1553, there is definitely so inefficient code in there.
For example:
This is iterating over every line in shapes.txt, when the set of unique shape ids is already available via
GtfsShapeTableContainer#byShapeIdMap()
.Then, the worst offender:
For each shape ids, we are again looping over every entry in shapes.txt to find matching shape points. This is where the NxM blow-up and slow-down is likely coming from. Again
GtfsShapeTableContainer#byShapeIdMap()
already has all the shape points grouped by shape id and should be used directly.I'd also point out that the shape points and stop points below should both probably be filtered by
hasShapeDistTraveled
as well.Originally posted by @bdferris-v2 in #1587 (comment)
The text was updated successfully, but these errors were encountered: