Further optimization for route handler iteration