akash-akya / ex_cmd

ExCmd is an Elixir library to run external programs and to communicate with back pressure
MIT License
65 stars 3 forks source link

Fix streaming input memory usage #22

Closed bfolkens closed 1 year ago

bfolkens commented 1 year ago

Per #21 - the input stream option currently uses Enum.into/2, which eager-loads the stream before sending it to the process. Instead, propose to use Stream.into/2 so that the stream is able to pass chunks to the process as they're needed.

Note, this commit includes PR #20