Open kaligrafy opened 1 year ago
To be investigated: I tested locally and on a server, with new paths going through the city of montreal and it's not so bad with 40+ nodes. Nodes typically have a radius of 50m. What is your default radius?
Also 50
But if possible, it should be almost instantaneous
I could argue that 2 seconds is "almost instantaneous"... :p
I mean instantaneous like snappy. No wait at all! :-)
We should also reduce the default 50m to something larger. In an ideal world, we should just check the intersections size and complexity with OpenStreetMap and enlarge the radius automatically accordingly.
Map matching performance is becoming really slow, especially for long paths. We should reduce the radius around nodes for already selected nodes while keeping a certain number of previously selected nodes with the correct radius. Example: if there are 10 nodes in the path, keep the default or customized radius for the last 5 selected nodes, but reduce the radius of the last 5 to almost 0. It should not change paths too much and anyway, the user can drag a waypoint to force a detour or a specific route segment. This needs some testing to find the best compromise. We could also make this a preference (keep node routing radius for x last selected nodes). In fact, if the user inserts a node at the beginning or in the middle, we should keep the routing radius unchanged for x nodes before and after the new selected node.