From 1508874ebc725958f97b8fee1a32fe4f20f1b317 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Thu, 24 Jul 2014 18:00:37 +0200 Subject: [PATCH] return early if way is not either highway=* or route=* in car profile. Estimated cost saving 10% --- profiles/car.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/profiles/car.lua b/profiles/car.lua index 9c65852c7..8f8d1bcdd 100644 --- a/profiles/car.lua +++ b/profiles/car.lua @@ -112,6 +112,14 @@ function node_function (node) end function way_function (way) + + local is_highway = way.tags:Holds("highway") + local is_route = way.tags:Holds("route") + + if not (is_highway or is_route) then + return + end + -- we dont route over areas local is_area = way.tags:Holds("area") if ignore_areas and is_area then