The partValues doesn't change per partition, we can move out of the iter.map, the same for the later one.