Forum: Ruby on Rails Loading ActiveRecord and ActionMailer only in a worker process to save memory

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Daniel C. (Guest)
on 2008-12-12 08:34
(Received via mailing list)
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
This topic is locked and can not be replied to.