[New-bugs-announce] [issue32383] subprocess.Popen() is slower than subprocess.run()

Николай Соколов report at bugs.python.org
Wed Dec 20 04:57:21 EST 2017


New submission from Николай Соколов <sokolov.nicholas at gmail.com>:

Hello.

I noticed different speed of application, which was execute with subprocess.Popen() and subprocess.run().

I tested on Linux Ubuntu 17.04 and Windows 10.
My command line is:
     "ffmpeg -i big_buck_bunny_480p_surround-fix.avi -f null -" 
you can use any video file on your PC.
I used ffmpeg (open source encoder/decoder/and etc.), but you can use any applications, which counts himself speed of work.

I got a difference in speed:

Using by terminal: fps=4402 (frame per second);
Using by run(): fps=4019;
Using by Popen(): fps=3431;

On Windows is difference about 5% percent, on Linux about 10% percent.

I did not use additional flags. All by default.
I downloaded video stream here https://peach.blender.org/download/

----------
components: Library (Lib)
messages: 308711
nosy: Николай Соколов
priority: normal
severity: normal
status: open
title: subprocess.Popen() is slower than subprocess.run()
type: performance
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32383>
_______________________________________


More information about the New-bugs-announce mailing list