-
Couldn't load subscription status.
- Fork 8
Open
Description
For basic methods like .map and .filter, on AsyncIterator, using the SimpleTransformIterator introduces uneccessary overhead via the readAndTransformSimple operator. To improve performance in applications like Comunica it may be worth creating custom iterators with simpler read methods; for instance a synchronous MapIterator could skip buffering entirely and just be implemented as something like
export class MapIterator<T, S> extends AsyncIterator<S> {
...
read() {
if ((item = source.read()) !== null)
return this.map(item);
}
}@jacoscaz I suspect this is the cause of the potential slowdown you were encountering when doing a large amount of chaining.
Metadata
Metadata
Assignees
Labels
No labels