Closed greenscientist closed 1 year ago
Tested with orsm by setting bool OsrmFetcher::birdDistanceAccessibilityEnabled to true
Ran with ./src/trRouting --cachePath transition_od_mtl_2023/ --cacheAllConnectionSets=true --debug=1
time wget "http://localhost:4000/v2/route?origin=-73.603835,45.527467&destination=-73.580651,45.477921&scenario_id=68c38af2-91af-49da-8c49-7082f63ea127&time_of_trip=54000&time_type=0&alternatives=false&min_waiting_time=180&max_access_travel_time=900&max_egress_travel_time=900&max_transfer_travel_time=600&max_travel_time=10800" time wget "http://localhost:4000/v2/route?origin=-73.603835,45.527467&destination=-73.580651,45.477921&scenario_id=f2ddf899-cea2-4ae7-9e60-f213cf86ce87&time_of_trip=54000&time_type=0&alternatives=false&min_waiting_time=180&max_access_travel_time=900&max_egress_travel_time=900&max_transfer_travel_time=600&max_travel_time=10800"
The first request for each scenario are about real 0m0,360s user 0m0,004s sys 0m0,009s
And the next ones are real 0m0,027s user 0m0,006s sys 0m0,001s
In a situation where you have multiple scenario and where you often switch between them, having only one connection set in the cache does not offer lot of perf improvement.
This add a --cacheAllConnectionSets parameter, which when set to true will cache all connection cache.
This is implemented with a new ScenarioConnectionCacheAll class. (the old one renamed to ScenarioConnectionCacheOne) The flag define which one the TransitData class will instanciate.
Issue #252