Daniel Choi
2008-Dec-12 06:33 UTC
Loading ActiveRecord and ActionMailer only in a worker process to save memory
For a Rails app, I have a SimpleDaemon process that does some URL fetching and sends off emails. The daemon script requires the config/ environment.rb of the Rails app. But this script really only needs to require ActiveRecord and ActionMailer. I''m thinking of refactoring my code so as not to include the entire Rails environment, but I have a two questions for anyone who has experience doing something similar: 1. Can it save a lot of memory to do this? 2. If I''m using Ruby Enterprise Edition and Phusion for the Rails app, do the memory and speed benefits extend to the daemon script? Thanks to anyone who can help --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---