Ruby on Rails Monday, May 31, 2010

Greg Ma wrote:
> Hi,
> I am developping a little chat application with rails. On my chat page I
> make ajax request every 10 seconds to check if there are news messages.
> I think if I keep this thing with a lot of user my performance will get
> really low.
>

It shouldn't if you structure your queries efficiently

> How can I improve this? Is is possible to observe when a row is added?

Perhaps, but pushing to the browser is difficult or impossible.

> Or how can I effeciently cache the messages?
>
> Thanks,
> Greg

You're doing premature optimization. Worry about the bottlenecks when
you can actually measure them, not when you're just speculating.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
--
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@googlegroups.com.
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.

No comments:

Post a Comment