Orange 73
2008-Apr-14 21:22 UTC
All rails scripts running slow -- require_frameworks() probl
I''m using InstantRails to build my rails app. Anytime i try to run a rails script (the two i usually run are `ruby script/server webrick` and `ruby script/runner ''Mailer.check_mail''` (an ActionMailer to check a GMail account over IMAP and retrieve messages). I have profiled both of these applications with Ruby Performance Validator, and they are both spending like 98% of the time at require_frameworks(). I can see that as being acceptable for webrick, but why would the mailer script be running so slow, especially after I have webrick (and the associated frameworks) loaded and running? I have tried messing around with setting RUBYOPT=rubygems, but that doesn''t seem to help. I am on a windows box running Ruby 1.8.6, Rails 2.0.2. Any help would be appreciated! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Apr-14 21:56 UTC
Re: All rails scripts running slow -- require_frameworks() probl
On Apr 14, 10:22 pm, Orange 73 <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I''m using InstantRails to build my rails app. Anytime i try to run a > rails script (the two i usually run are `ruby script/server webrick` and > `ruby script/runner ''Mailer.check_mail''` (an ActionMailer to check a > GMail account over IMAP and retrieve messages). I have profiled both of > these applications with Ruby Performance Validator, and they are both > spending like 98% of the time at require_frameworks(). I can see that > as being acceptable for webrick, but why would the mailer script be > running so slow, especially after I have webrick (and the associated > frameworks) loaded and running? >script/runner loads the entire framework (it''s kind of the point of it) so it''s never going to be lightening fast. If you''re going to be running the script often you may be better off with a long running process rather than thrashing around reloading rails every 30 seconds. Fred --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---