From: Antoine Pitrou Date: Wed, 2 Jun 2010 17:08:47 +0000 (+0000) Subject: Issue #8873: add a documentation note about possible performance issues with the X-Git-Tag: v2.7rc1~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c395545a4ab4b4760c0472af74f526f405389864;p=thirdparty%2FPython%2Fcpython.git Issue #8873: add a documentation note about possible performance issues with the default of unbuffered IO in subprocess.Popen. --- diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 19a8b6b82605..b5e769cab596 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -94,6 +94,12 @@ This module defines one class called :class:`Popen`: size. A negative *bufsize* means to use the system default, which usually means fully buffered. The default value for *bufsize* is :const:`0` (unbuffered). + .. note:: + + If you experience performance issues, it is recommended that you try to + enable buffering by setting *bufsize* to either -1 or a large enough + positive value (such as 4096). + The *executable* argument specifies the program to execute. It is very seldom needed: Usually, the program to execute is defined by the *args* argument. If ``shell=True``, the *executable* argument specifies which shell to use. On Unix,