kuanb / peartree

peartree: A library for converting transit data into a directed graph for sketch network analysis.
MIT License
201 stars 23 forks source link

[performance] Refactor RouteProcessor's edge time generation #122

Open kuanb opened 5 years ago

kuanb commented 5 years ago

Edge time generation is where most of runtime is spent. The below image demonstrates the breakdown of time by each route in the AC Transit GTFS feed:

eval-time-cost-route-processor

Total runtime is ~10-11 seconds on my current machine. Using mp increases that to 11-12 seconds (this is bad). Inefficiencies are tied up in the execution of the generate_all_observed_edge_costs method within generate_route_costs.