Improved pathfinding performance