-
Notifications
You must be signed in to change notification settings - Fork 1
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
Nav 126 re improve performance of raptor #80
Conversation
… multi day raptor connections.
… multi day tests.
…re requesting connections.
…d day while creating stop times array instead of trip mask.
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.
Ufff that was a slightly bigger PR :)
Thanks @clukas1, really good work!
Most of my comments are about naming things, but I also have some functional issues:
- We have a lot of caches now, somehow I feel like we are caching on multiple levels. I would only cache at the outermost level in the StopTimeProvider to have everything in one place.
- TripMask, ServiceDayMask, RaptorTripMaskProvider, maybe combine them with inner classes so it's clear that they belong together and also the hierarchy between them.
- Maybe encapsulate the logic for accessing the stop time array in a StopTimeUtils class?
Overall, the service day masking approach in the Raptor is very nice.
src/main/java/ch/naviqore/service/impl/PublicTransitServiceInitializer.java
Show resolved
Hide resolved
src/main/java/ch/naviqore/service/impl/convert/GtfsToRaptorConverter.java
Show resolved
Hide resolved
src/main/java/ch/naviqore/service/impl/convert/GtfsTripMaskProvider.java
Show resolved
Hide resolved
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.
Thanks @clukas1 for the adjustments!
I found something else, the additional transfers are generated, but not used in the transit service implementation. I am not sure if we can simply remove them from the constructor?
If yes, could you please shortly explain? If no, please fix :)
Except from this, looks good to merge.
…:naviqore/raptor into NAV-126-Re-Improve-Performance-of-Raptor # Conflicts: # src/main/java/ch/naviqore/service/impl/PublicTransitServiceImpl.java
All comments addressed now |
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.
Thanks, @clukas1!
Looks good to merge.
Improving the performance of the multi day raptor.
This is achieved by creating int based stoptime arrays for all service days based on the trip masks provided by the tripmaskprovider. This stoptime arrays contain additional information to allow jumping between days efficiently.
The array is built up as:
The StopTimes are created in the new class
RaptorCache
only known to the Raptor package.Comparison of Performance:
Before (first Multi Day Raptor implementation only using TripMasks)
After Improvements: