Update pathfinding more efficiently