# Rails Application Performance

**URL:** <https://www.ruby-forum.com/t/rails-application-performance/172432>\
**Category:** Rails\
**Created:** [July 21, 2009, 3:02pm UTC](https://www.ruby-forum.com/t/rails-application-performance/172432 "2009-07-21T15:02:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![railslist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/65b543/32.png) [@railslist](https://www.ruby-forum.com/u/railslist)\
**Post date:** [July 21, 2009, 3:02pm UTC](https://www.ruby-forum.com/t/rails-application-performance/172432/1 "2009-07-21T15:02:19Z")

</div>

I have recently finished a very small application in Rails. This  
application can be found @ [http://www.classifieds.org.in](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?.

---

<div class="post-metadata">

**Author:** ![railslist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/65b543/32.png) [@railslist](https://www.ruby-forum.com/u/railslist)\
**Post date:** [July 21, 2009, 4:02pm UTC](https://www.ruby-forum.com/t/rails-application-performance/172432/2 "2009-07-21T16:02:06Z")

</div>

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](http://www.thepeoplesfeed.com/contribute)  
On Tue, Jul 21, 2009 at 9:02 AM, Rails L. \<

---

<div class="post-metadata">

**Author:** ![railslist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/65b543/32.png) [@railslist](https://www.ruby-forum.com/u/railslist)\
**Post date:** [July 21, 2009, 4:48pm UTC](https://www.ruby-forum.com/t/rails-application-performance/172432/3 "2009-07-21T16:48:54Z")

</div>

On Tue, Jul 21, 2009 at 6:02 AM, Rails  
List[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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 S. ------------------------ removed\_email\_address@domain.invalid  
twitter: @hassan

---

<div class="post-metadata">

**Author:** ![railslist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/65b543/32.png) [@railslist](https://www.ruby-forum.com/u/railslist)\
**Post date:** [July 22, 2009, 6:09am UTC](https://www.ruby-forum.com/t/rails-application-performance/172432/4 "2009-07-22T06:09:46Z")

</div>

I agree with hassan … while working on scrumpad(www,[scrumpad.com](http://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 S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![railslist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/65b543/32.png) [@railslist](https://www.ruby-forum.com/u/railslist)\
**Post date:** [July 22, 2009, 6:27am UTC](https://www.ruby-forum.com/t/rails-application-performance/172432/5 "2009-07-22T06:27:18Z")

</div>

I don’t think you should worry too much on performance until you  
really need to.

I use New Relic too for [youthsays.com](http://youthsays.com). But you could there are others  
you could try out. Checkout  
[#161 Three Profiling Tools - RailsCasts](http://railscasts.com/episodes/161-three-profiling-tools)  
for more tutorial on other tools

Cheers!  
Arzumy
