Ruby - Read file in batches

Posted by Algorist on Stack Overflow See other posts from Stack Overflow or by Algorist
Published on 2010-06-02T22:41:59Z Indexed on 2010/06/02 22:44 UTC
Read the original article Hit count: 279

Filed under:
|
|

Hi,

I am reading a file that is 10mb in size and which contains some id's. I read them into a list in ruby. I am concerned that it might cause memory issues in the future, when the number of id's in file might increase. Is there a effective way of reading a large file in batches?

Thank you

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby