I was benchmarking a simple rake task we have that is in a more critical path, and noticed that a good portion of the time is spent on loading/initializing routes.
Close to 19% of the execution is spend on
routes_reloader, for a code that doesn’t use it.
This seems like an obvious low ranging fruit here, as most likely rake tasks don’t need any routes and for the eventuality someone is using them, that could be optionally
eager_loaded! or could be lazy loaded when using something like a
Does that make sense as a feature contribution? What are the main traps and gotchas I should be aware here?