Hi all,
I’m running a self-hosted ORS v9.9 instance (driving-car, edge-based CH, graph covering DE+AT+CZ, ~2 GB graph, 16 GB heap) and single-route requests are excellent — a 730 km Berlin->Salzburg route returns in ~42 ms. However, alternative_routes requests are unusably slow, and I can’t find a way to speed them up.
Measured timings (same instance, target_count: 3, share_factor: 0.6, weight_factor: 1.6):
- 86 km route: single route ~80 ms, 3 alternatives ~27 s
- 730 km route: single route ~42 ms, 3 alternatives >115 s (did not complete in my test window)
What I’ve already tried, based on older forum threads suggesting landmark-based speedups:
- Built a dedicated LM graph (
methods.lm.enabled: true, landmarks: 16). No measurable improvement for alternatives. - Built a dedicated Core graph (
methods.core.enabled: true, landmarks: 32, withexecution.methods.core.active_landmarks: 6). The graph builds fine and single routes work, but alternative-route timings are identical to the plain CH graph — no speedup at all.
My current understanding is that alternative_routes generation is an inherently expensive Dijkstra-style search that does not benefit from CH, Core, or LM preprocessing, since these accelerate point-to-point queries but not the penalty-based plateau/admissible-path exploration used for alternatives. Is that correct?
My questions:
- Is there any supported configuration that makes
alternative_routesviable on medium/long distances (200–700 km), or is the algorithm fundamentally unsuited to long routes? - Does
target_countdominate the cost, i.e. wouldtarget_count: 2(one alternative) be dramatically cheaper than 3, or is the bulk of the cost in the initial admissible-path search regardless of count? - Do
share_factor/weight_factormaterially affect runtime, or only which results are returned? - Is there a recommended distance ceiling above which alternatives should simply be disabled?
For context: my use case is an EV charging route planner, where alternatives are only a “nice to have” for the web UI. My current plan is to disable alternatives entirely for ORS and keep the single fast optimal route, falling back to a commercial provider (which returns alternatives natively in <1 s) only when alternatives are explicitly needed. But I’d prefer a native ORS solution if one exists.
Config and version details available on request.
Thanks!
Jan