I've been profiling performance of our app and noticed that all the calls to Rails.env.production? (used extensively) are taking rather long.
After seeing its source, everything was clear: http://github.com/rails/rails/tree/2bf58aa782d3b493f2d98f153324b93c5b058ba6/railties/lib/initializer.rb#L51-54 First it does a `require`, then it instantiates a new object on each call. After removing the require and memoizing the object, I've upped the performance of our application by 5 req/s. Is there a reason for the current implementation? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
