Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsv-filter --line-buffered #333

Merged
merged 6 commits into from
Mar 3, 2021
Merged

Conversation

jondegenhardt
Copy link
Contributor

@jondegenhardt jondegenhardt commented Mar 3, 2021

This PR adds a --line-buffered option to tsv-filter. When run with this, tsv-filter will read and write each line without buffering. This is useful when processing input streams that receive data slowly. However, it is a performance hit when data is available in bulk.

This was implemented by added support to BufferedInputRange and BufferedOutputRange, then invoking these facilities with the proper parameters from tsv-filter proper. This also enabled getting rid of the ad-hoc scheme in tsv-filter for ensuring lines were occasionally written when run on slow input streams.

Line buffered support will be added to other tools in the future. One step that needs to occur for some of the tools is to add support to ByLineSourceRange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant