I''m using ActiveRecord outside of Rails. The time for a script to execute "require ''active_record''" is about 2.5 seconds on my 666 MHz machine. Is there any way to speed it up (aside from a faster processor)? Maybe some way to pre-load ActiveRecord? The script is invoked by a user action, so it needs to start quickly. Thanks, Earle -- 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 -~----------~----~----~----~------~----~------~--~---
Get a faster machine. On 7/17/07, Earle Clubb <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > I''m using ActiveRecord outside of Rails. The time for a script to > execute "require ''active_record''" is about 2.5 seconds on my 666 MHz > machine. Is there any way to speed it up (aside from a faster > processor)? Maybe some way to pre-load ActiveRecord? The script is > invoked by a user action, so it needs to start quickly. > > Thanks, > Earle > > -- > 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 -~----------~----~----~----~------~----~------~--~---
On 7/17/07, Earle Clubb <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I''m using ActiveRecord outside of Rails. The time for a script to > execute "require ''active_record''" is about 2.5 seconds on my 666 MHz > machine. Is there any way to speed it up (aside from a faster > processor)? Maybe some way to pre-load ActiveRecord? The script is > invoked by a user action, so it needs to start quickly.You can run it as a separate DRB process, and the user action just connects with DRB and invokes the action. Here''s a simple Daemon module so you can manage pids and all that: http://snippets.dzone.com/posts/show/2265 This is how rails (using mongrel/http or fcgi instead of drb of course) pre-loads the framework. -- Rick Olson http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.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 -~----------~----~----~----~------~----~------~--~---