Increased performance of the pathfinding