The only way to do this in a pure Ruby way is to poll all the files in a
thread. I'm not sure if this would be more or less performant. We tried this
in Merb and people were annoyed by the constant CPU usage (3-10%) used by
polling the entire tree. Something like watchr could make this better.

If you're interested, a good solution would probably be to make the logic
for deciding to reload everything (in Rails, this is "running the to_prepare
hooks") pluggable, such that people could experiment with using watchr et
al.

I'll happily give you a tour of the affected areas if you're interested.

Yehuda Katz
Architect | Engine Yard
(ph) 718.877.1325


On Sat, Jul 3, 2010 at 10:40 AM, rogerdpack <rogerpack2...@gmail.com> wrote:

> Request (unless rails already does this...)
>
> Currently with active_support it reloads the class chain at the
> beginning of each incoming HTTP request.
>
> Suggestion: reload the class chain only if a file in a lib path *has
> changed*
> Thoughts?
> -r
>
> --
> 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 rubyonrails-c...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-core+unsubscr...@googlegroups.com<rubyonrails-core%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-core?hl=en.
>
>

-- 
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 rubyonrails-c...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to