Message106892
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 |
|
Date |
User |
Action |
Args |
2010-06-02 15:32:29 | hughsw | set | recipients:
+ hughsw, gregory.p.smith, pitrou |
2010-06-02 15:32:29 | hughsw | set | messageid: <1275492749.57.0.0370658207184.issue8873@psf.upfronthosting.co.za> |
2010-06-02 15:32:28 | hughsw | link | issue8873 messages |
2010-06-02 15:32:27 | hughsw | create | |
|