optimizing roll up processor to use iterable for memory optimization