yeah, just reduce the per_page limit. also range#each if you don't care about the return value and n.times if you don't even care about the iterated value.