Open domenkozar opened 4 years ago
I typically use builders for chunking. Are there cases where this kind of approach is demonstrably faster?
According to the https://github.com/blitzcode/conduit-chunked#benchmark, it's about 10x slower, but that benchmark should probably be updated and reran since it's quite old.
I wouldn't be surprised to hear that, it seems reasonable that rechunking could get some performance improvements. In any event: I'd accept a PR adding some kind of functionality like this.
I'd propose adding
chunk :: MonadIO m => ChunkSize -> ConduitT ByteString ByteString m ()
to conduit as it seems quite common use case to chunk up a bytestring stream (for example when uploading to some service like amazonka-s3-streaming).Implementation from https://github.com/blitzcode/conduit-chunked