envato-archive / guide

Document your application with a living component library and styleguide
https://rubygems.org/gems/guide
MIT License
8 stars 3 forks source link

Rails 4.2 performance fix #75

Closed mariovisic closed 8 years ago

mariovisic commented 8 years ago

There exists a bug introduced in rails 4.2 where calling the url_helpers of an engine will parse the entire set of routes again and create a new object, as a result there is a huge slowdown when looping, calling the url_helpers object again and again.

As the url helpers are included in the base controller, these methods are available anyways, calling them this way doesn't parse all the routes.

Before: Completed 200 OK in 8337ms After: Completed 200 OK in 542ms