The call to toIterator itself shouldn't materialize the TraversableOnce AFAICT. The call to grouped(blockSize) should not materialize everything into memory since according to *my* reading of the scala library source code (https://github.com/scala/scala/blob/v2.10.2/src/library/scala/collection/Iterator.scala#L862), the grouping is done lazily. Every time there .next() is called on the iterator, a buffer is filled and returned to the client (i.e, us).