I have recently finished a very small application in Rails. This application can be found @ http://www.classifieds.org.in Currently, I manage user view state using sessions. For example to hold current city, current category etc. But the application appear to be very slow. Would it be good to store the user state in cookies, so that the performance will be better?. -- Posted via http://www.ruby-forum.com/.
I would presume that using cookies could open you up to certain security holes and additional programming confusion. Also, ROR is already mainting the "session" using cookies. The session is provided to you as a construct to avoid additional programming effort. You are kinda sidestepping that by using your own cookies. I''m not sure but maybe ROR provides the ability to presist sessions so they don''t use too much memory. ====================Jim http://www.thepeoplesfeed.com/contribute On Tue, Jul 21, 2009 at 9:02 AM, Rails List < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I have recently finished a very small application in Rails. This > application can be found @ http://www.classifieds.org.in > > Currently, I manage user view state using sessions. For example to hold > current city, current category etc. But the application appear to be > very slow. > > Would it be good to store the user state in cookies, so that the > performance will be better?. > -- > 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 Tue, Jul 21, 2009 at 6:02 AM, Rails List<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Currently, I manage user view state using sessions. For example to hold > current city, current category etc. But the application appear to be > very slow. > > Would it be good to store the user state in cookies, so that the > performance will be better?.What leads you to think your session management is the issue? Have you used any performance analysis tools (e.g. New Relic)? -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan
I agree with hassan .. while working on scrumpad(www,scrumpad.com) , next generation project management tool for scrum we have use New Relic and we found that one very helpful. you can use eager loading to get rid of extra generated query that will help you caching , at this moment ROR support various type of caching. On Jul 21, 9:48 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Jul 21, 2009 at 6:02 AM, Rails > > List<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > Currently, I manage user view state using sessions. For example to hold > > current city, current category etc. But the application appear to be > > very slow. > > > Would it be good to store the user state in cookies, so that the > > performance will be better?. > > What leads you to think your session management is the issue? > > Have you used any performance analysis tools (e.g. New Relic)? > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan
I don''t think you should worry too much on performance until you really need to. I use New Relic too for youthsays.com. But you could there are others you could try out. Checkout http://railscasts.com/episodes/161-three-profiling-tools for more tutorial on other tools Cheers! Arzumy On Jul 22, 12:09 pm, sami <ssza...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I agree with hassan .. while working on scrumpad(www,scrumpad.com) , > next generation project management tool > for scrum we have use New Relic and we found that one very helpful. > > you can use eager loading to get rid of extra generated query that > will help you > caching , at this moment ROR support various type of caching. > > On Jul 21, 9:48 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > On Tue, Jul 21, 2009 at 6:02 AM, Rails > > > List<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > Currently, I manage user view state using sessions. For example to hold > > > current city, current category etc. But the application appear to be > > > very slow. > > > > Would it be good to store the user state in cookies, so that the > > > performance will be better?. > > > What leads you to think your session management is the issue? > > > Have you used any performance analysis tools (e.g. New Relic)? > > > -- > > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > twitter: @hassan