Periodically_call_remote & WEBrick poor performance

Hi,

I’m getting very poor performance when using
periodically_call_remote() in a Rails application. By poor performance
I mean that pages don’t refresh at the requested interval (specified
in the periodically_call_remote args). Moreover, if I open more
browsers, the refresh time decreases even more.

Right now I have the frequency set to 5 seconds, and the update sends
back to the browser approx. 1200 bytes. I tested with 1 browser
(refresh rate is 5 sec), 4 browsers (refresh rate is 8 sec) and 10+
browsers (refresh rate varies between 7 sec and 25 sec). I understand
that the refresh rate is higher than 5 seconds since you need to
account for the request/reply time, but I refuse to belive it can’t
scale better.

I made sure that periodically_call_remote() is called properly and
that one update doesn’t cause multiple updates. I also made sure that
the action method executed on the server is very fast (initially I had
some DRb calls, but now it simply returns a Struct whose properties
are displayed in the view).

Since I’m new to Rails and Ajax, I wanted to know if this is expected,
or if there is something wrong with the way I organized the
periodically_call_remote() code.

Thanks,
Tiberiu M.

PS. I’m using WEBrick

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs