From b6bdff48fc86c694cbfaf756c50d59c8685ec4ca Mon Sep 17 00:00:00 2001 From: Kyler Chin <7539174+kylerchin@users.noreply.github.com> Date: Sun, 24 Nov 2024 21:35:22 -0800 Subject: [PATCH] use the internal cache properly --- src/aspen/import_alpenrose.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/aspen/import_alpenrose.rs b/src/aspen/import_alpenrose.rs index 2693968..7dee8ec 100644 --- a/src/aspen/import_alpenrose.rs +++ b/src/aspen/import_alpenrose.rs @@ -382,6 +382,11 @@ pub async fn new_rt_data( trip_id_to_trip.insert(trip.trip_id.clone(), trip); } + for (trip_id, trips_in_cache) in + compressed_trip_internal_cache.compressed_trips { + trip_id_to_trip.insert(trip_id.clone(), trips_in_cache.clone()); + } + let trip_id_to_trip = trip_id_to_trip; //also lookup all the headsigns from the trips via itinerary patterns @@ -392,6 +397,8 @@ pub async fn new_rt_data( list_of_itinerary_patterns_to_lookup.insert(trip.itinerary_pattern_id.clone()); } + compressed_trip_internal_cache.compressed_trips = trip_id_to_trip.clone(); + let itin_lookup_start = std::time::Instant::now(); let itinerary_patterns =