]> granicus.if.org Git - python/commitdiff
Issue #8873: add a documentation note about possible performance issues with the
authorAntoine Pitrou <solipsis@pitrou.net>
Wed, 2 Jun 2010 17:08:47 +0000 (17:08 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Wed, 2 Jun 2010 17:08:47 +0000 (17:08 +0000)
default of unbuffered IO in subprocess.Popen.

Doc/library/subprocess.rst

index 19a8b6b8260527a9e9cc1a72ce3adac9e8ddd54d..b5e769cab596024897a3841e034594168f4d1abf 100644 (file)
@@ -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,