I was checking out this package today and noticed that it doesn't currently support streaming I/O operations.
The new stdin scheme slurps the whole stream into an in memory buffer and then returns it, rather than returning a reader that can lazily request bytes as required.
I think this is mainly to conform to the ReadSeekCloser interface?
Things like unix pipes/network requests etc. unfortunately can't 'seek', which makes them hard to conform into this interface without buffering or dropping support for seek.
I just wanted to bring this to your attention, if we wanted to support streams larger than memory in the future (such as piping collections of features) then this pattern would be constrained by available memory.
I was checking out this package today and noticed that it doesn't currently support streaming I/O operations.
The new
stdin
scheme slurps the whole stream into an in memory buffer and then returns it, rather than returning a reader that can lazily request bytes as required.I think this is mainly to conform to the
ReadSeekCloser
interface?Things like unix pipes/network requests etc. unfortunately can't 'seek', which makes them hard to conform into this interface without buffering or dropping support for seek.
I just wanted to bring this to your attention, if we wanted to support streams larger than memory in the future (such as piping collections of features) then this pattern would be constrained by available memory.