Skip to content

Commit

Permalink
use the internal cache properly
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerchin committed Nov 25, 2024
1 parent e6b6ce8 commit b6bdff4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/aspen/import_alpenrose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 =
Expand Down

0 comments on commit b6bdff4

Please sign in to comment.