naviqore / public-transit-service

Public transit schedule information and connection routing service based on GTFS data and the RAPTOR algorithm.
MIT License
4 stars 1 forks source link

Nav 126 re improve performance of raptor #80

Closed clukas1 closed 2 months ago

clukas1 commented 3 months ago

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) NAV-66 After Improvements: NAV-126

munterfi commented 3 months ago

Heap memory usage for Switzerland: image

munterfi commented 3 months ago

After one request: http://localhost:8080/routing/connections?sourceStopId=Parent8503059&targetStopId=Parent8516161&datetime=2024-07-09T01:10:00 image

clukas1 commented 3 months ago

image Explanation of stop times array

clukas1 commented 2 months ago

All comments addressed now