How we sped up public transit routing around the globe
OpenTripPlanner plans journeys for transit agencies and national governments. We found a change that makes its targeted routing phase up to two times faster — and got it merged upstream, enabled by default.
- Industry
- Public transit, Mobility
- Region
- Global
- Services
- Performance engineering, Algorithm research, Open-source contribution
- Timeline
- 2026

- Faster targeted routing phase
- Up to 2×
- Merged into OTP, on by default
- Upstream
Intro
OpenTripPlanner (OTP) is one of the world’s most widely used open-source multimodal journey planners. It combines transit schedules with walking, cycling and ridesharing, and its users range from single city agencies to national governments.
It powers trip planning for TriMet (Portland), MBTA (Boston), MARTA (Atlanta), LA Metro, Sound Transit (Seattle), HART (Tampa), METRO (Houston) and New York State DOT in the United States, and for nationwide deployments in Norway and Finland, Skånetrafiken in southern Sweden, Rennes and Grenoble in France, Piemonte/Torino and Trento in Italy, Lower Saxony and Leipzig in Germany, and Valencia in Spain.
Goals and challenges
- 01
Faster routing without destabilizing a mature engine
OTP serves enormous query volumes across large multimodal networks, so milliseconds saved per request add up to lower latency for riders and lower compute cost for the agencies running it. Any change had to be small, safe and easy to review, because it would ship to every deployment.
Solution
We profiled the hot paths of the routing core and targeted the highest-impact bottleneck. The fix is a few lines of code — sorting a list and adding a single early-exit test — which kept the change low-risk and easy to upstream.
The full technical write-up, with benchmarks across networks, is in our research article.
Results
- On OTP’s continuous performance benchmark, the targeted routing phase became up to two times faster in many networks.
- The change was merged into OpenTripPlanner and enabled by default, so every deployment benefits — from single agencies to nationwide systems.
- A minimal, low-risk change that is easy to maintain.
Project details
- Industry
- Public transit, Mobility
- Region
- Global
- Services
- Performance engineering, Algorithm research, Open-source contribution
- Technologies
- OpenTripPlanner
- Java
- RAPTOR
- Multimodal routing
- Timeline
- 2026
Discover more

AI-powered construction monitoring platform
Construction · Computer Vision · VLM · Drones · 3D Visualization · SaaS

Faster APIs, automation and AI recommendations for WKO Inhouse
Gov · App development · Recommendation System · OpenAI · Data Science

LLM-based credit scoring using transaction data
Scoring systems · Data Science · Fintech