Skip to content

save should stream data whenever possible #7590

Closed

Description

@rgwood

Related problem

save collects input data in a few situations where it doesn't always need to:

output.into_value(span)
}
None => input.into_value(span),

input => match input.into_value(span) {

Describe the solution you'd like

save should always stream ListStream input into a file instead of attempting to collect it all.

It should be possible to stream to a file slowly:

1..100 | each { |i| sleep 400ms; $i} | save -f output.txt

And watch individual lines (or batches of lines) arrive with tail --follow in another shell:

tail --follow output.txt

Additional context and details

Hat tip to this comment: #6178 (comment)

Activity

  1. added
    category:enhancement
    A:streaming
    on Dec 24, 2022
  2. NotLebedev commented on Dec 27, 2022

    @NotLebedev
    Contributor

    Could fix this issue after PR #7608 with refactoring of save is reviewed and merged. I hope that refactoring will make this and any work on save in future more pleasant.

  3. added a commit that references this issue on Jan 15, 2023
    0353eb4
  4. added this to the v0.75 milestone on Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:streamingcategory:enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions