Follow up item from this conversation. There is a possible memory optimization by avoiding the Vec allocation in to_progress_entries by returning a ExactSizeIterator instead of a Vec.
This will require a more substantial change to the call site at flush_progress().