Should I expect Comet to be this slow?
- by Chad Johnson
I have the following in a Rails controller:
def poll
records = []
start_time = Time.now.to_i
while records.length == 0 do
records = Something.uncached{Something.find(:all,
:conditions => { :some_condition => false})}
if records.length > 0
break
end
sleep 1
if Time.now.to_i - start_time >= 20
…