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

chaining commands that generate large output is impractical #2

Open
abg opened this issue Oct 30, 2013 · 1 comment
Open

chaining commands that generate large output is impractical #2

abg opened this issue Oct 30, 2013 · 1 comment

Comments

@abg
Copy link

abg commented Oct 30, 2013

subprocess.run uses Popen.communicate() which buffers data in memory. So some tasks that might be desirable to run (e.g. mysqldump | gzip ) will use too much memory and fail for many cases. Ideally this would instead just link up pipes across processes and handle the file descriptor management behind the scenes, so it could handle arbitrary command chains.

@xando
Copy link
Owner

xando commented Nov 2, 2013

Thanks for the comment. You are totally right, it looks like I was super optimistic about
https://github.com/xando/subprocess.run/blob/master/run/__init__.py#L146

Will try to improve this process.

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

No branches or pull requests

2 participants