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

Do not buffer output when iterating it #53

Merged
merged 1 commit into from
Sep 2, 2024
Merged

Conversation

ehmicky
Copy link
Collaborator

@ehmicky ehmicky commented Sep 2, 2024

Fixes #33.

Both result.stdout/result.stderr and error.stdout/error.stderr will not be an empty string when iterating through the subprocess. Otherwise, this means we are buffering the output, which is defeating the purpose of iterating (from a memory consumption standpoint). Note: we should make sure we document this in the readme.

@ehmicky ehmicky requested a review from sindresorhus September 2, 2024 17:05
@sindresorhus sindresorhus merged commit 6e8cf4e into main Sep 2, 2024
12 checks passed
@sindresorhus sindresorhus deleted the no-stream-buffer branch September 2, 2024 19:08
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.

Output iteration + buffering
2 participants