# Periodically\_call\_remote & WEBrick poor performance

**URL:** <https://www.ruby-forum.com/t/periodically-call-remote-webrick-poor-performance/115617>\
**Category:** Rails\
**Created:** [September 26, 2007, 9:51pm UTC](https://www.ruby-forum.com/t/periodically-call-remote-webrick-poor-performance/115617 "2007-09-26T21:51:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mr\_tibs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/439d5e/32.png) [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Post date:** [September 26, 2007, 9:51pm UTC](https://www.ruby-forum.com/t/periodically-call-remote-webrick-poor-performance/115617/1 "2007-09-26T21:51:22Z")

</div>

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
