Datamapper’s #each works in sets of 500 so the amount of objects
instantiated at a time won’t make your computer think it’s a victim in a Saw
movie. Once it’s done executing your block on the first set of 500, it moves
on to the next.

DataMapper’s Ruby Doc

(via herdman) 

Notes