Shortest path saving.