[Python-Dev] subprocess.Popen: change default buffer size? (original) (raw)
Victor Stinner victor.stinner at haypocalc.com
Mon Nov 24 02:37:59 CET 2008
- Previous message: [Python-Dev] mlockall() in Python?
- Next message: [Python-Dev] CVE tracking
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
subprocess.Popen is much SLOWER than os.popen() on Mac and Solaris.
The goal is to read the output of a command (through a pipe) as fast as possible. The problem is the pipe buffering (the reader file in the Python process).
Today, subprocess.Popen() uses bufsize=0 by default. It should be bufsize=(-1): use the system default buffer size.
==> http://bugs.python.org/issue4194
Note: On Linux the performances between subprocess (unbuffered) and popen() (buffered) are the same, which is quite strange.
Victor
- Previous message: [Python-Dev] mlockall() in Python?
- Next message: [Python-Dev] CVE tracking
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]