ooor
ooor copied to clipboard
split very large reads, like foo.find(:all) into small bits ?
Using OOOR in The Kettle ETL, if we don't pay attention we can typically request a read over all account move lines to get them exported to some external accounting format. The issue is that can generate a timeout in OpenERP server when there are too many computed fields to recompute.
Rather than force the API user to think about that to avoid timeouts, may be it's better to split the read like 100 by 100 and then makes the union of the requests.
This is easy to implement in the find_every method of OOOR, buy I'm not very sure yet still if we should do it. Thoughts?
Actually, it's just better to simply make a search for ids rather than a huge read in those cases, so deferring that change until it gets more mindshare.
I propose we end implement the find_each API from active_record/relation/batches.rb for that.