Just want to know the best practices to make sure I get off on the right foot. I think on a general rule, creating fewer instances of an object is ideal for performance right? (I am not suffering any real problems yet) In Java, there is Inversion of Control/Dependency Injection. I have read some blog saying that Rails's way is using Modules. I have to look into more on Modules -- for example, are they equivalent to global functions?
> From: pavl...@gmail.com > Date: Mon, 10 Sep 2012 07:58:23 +0100 > Subject: Re: [Rails] Object Efficiency > To: rubyonrails-talk@googlegroups.com > > On 10 September 2012 05:03, rails2012 <derek...@hotmail.com> wrote: > > In my rufus config file, I have to call MyController.new.checkEmail. Now I > > set it to run every 5 minutes. So the system creates a new MyController > > instance every 5 minutes. That's very inefficient right? > > Normally it would be worth worrying about ten and hundreds of requests > a second... I don't think one every five minutes is going to cook the > processor. > > > What else can I do? Are there some advanced features in rails to mange > > object instance more efficiently? > > What problems are you suffering? Have you measured the degradation in > performance on your system? > > > PS I would suggest that if Rufus is polling a method, that method > should not be on a controller. It should be on a model, or as a > stand-alone lib class. > > -- > 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@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.