The one direct dijkstra optimalization.