Does querying for route `details` (max_speed, distance, etc...) incur performance penalty?

I’m curious if these are calculated on-the-fly and will slow down routing performance, or if they’re already calculated during the initial setup and incur no penalty.


Path details are calculated during a post-processing step after the actual route calculation. I don’t think they are very critical for overall routing performance and for example they should take significantly less time than other post-processing steps like path simplification and instructions calculations. Obviously you will get the fastest response if no points are calculated at all (calc_points=false) or when you skip instructions (calc_instructions=false). Path details also play a role during path simplification, because the path might not get simplified as much when lots of path details are requested and need to be preserved. So with lots of path details the size of the routing response might be bigger.

But to know exactly it will be best to try it for yourself. Note that you can also run the Measurement class to setup your own benchmarks. There is an option to include (or not include) path details: graphhopper/ at a3bd461c5823ef0cf532b9343696fce6ed7076ab · graphhopper/graphhopper · GitHub

Please do not hesitate to report back your findings here :slight_smile:

Powered by Discourse