Optimizing streamToTimespanCollection.