make PartialSorter capable of estimating the size of each item in the stream to manage its memory usage