Shouldn't this solve the problem ?

      unless defined?(ActiveSupport::StringInquirer)
        require 'active_support/string_inquirer'
      end

On Mon, Oct 13, 2008 at 2:19 AM, Mislav Marohnić
<[EMAIL PROTECTED]> wrote:
> 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?
> >
>



-- 
Cheers!
- Pratik
http://m.onkey.org

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to