Hugh Secker-Walker <hug...@users.sourceforge.net> added the comment:

OK.  Using bufsize=4096 or bufsize=-1 eliminates the CPU-hogging problem on Mac 
OS X.  Thank you.

I have to say that the Popen() doc could be better.  It says: "bufsize, if 
given, has the same meaning as the corresponding argument to the built-in 
open() function!" which implies behavior like open(), which is to use the 
system's default buffering, generally a good thing.

I think the default of 0, meaning unbuffered, is a poor choice.  I'm guessing 
many many Mac users are getting a big slowdown from this default behavior (as 
I've now discovered elsewhere in our project!).  I request that you change the 
default to be the same as open(), i.e. use the system default.

Barring that semantic change, please add a note to the doc:  "Most users will 
want to set bufsize=4096 for pipe-like buffering, or bufsize=1 for line-based 
buffering."  

Thanks again for the quick response and resolution.

-Hugh

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8873>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to