Improved efficiency by determining the routes just once