Took me about 10 minutes to add to an existing rails app that adds hundreds of markers onto a google map via json. Live updating as you scroll around.
Previously I was trying to find the sweet spot between how many slows down the initial rendering to the viewer vs showing all the markers.
Changed about 3 lines of javascript to use Oboe and changed my rails controller to:
per_page = 100
1.upto(10).each do |page|
response.stream.write ActiveModel::ArraySerializer.new( resources.paginate(page: page, per_page: per_page) , {root: 'cg'}).to_json
end
response.stream.close