keeping the memory consumption low even after long runs