AsyncIterator
AsyncIterator copied to clipboard
Performance: Improve performance of `append` and `prepend`
See use case for append in #66 .
append and prepend still go through the SimpleTransformIterator
IMO the cleanest way to do this would be to add a parameter to the UnionIterator in #65 that requires the iterators in the union to be consumed sequentially, and then for append and prepend to just return a union of the current source, and the data to append/prepend.
@jacoscaz - do you have any thoughts on this?
IMHO this is a (very) good idea, although I'm unsure as to how complex the final solution might be. Could be worth having a SequentialUnion iterator if having everything in one class becomes too much.