[issue11314] Subprocess suffers 40% process creation overhead penalty

Charles-Francois Natali report at bugs.python.org
Sun Feb 27 16:05:23 CET 2011


Charles-Francois Natali <neologix at free.fr> added the comment:

> Aaron Sherman <ajs at ajs.com> added the comment:
>
> "That's why I asked for absolute numbers for the overhead difference."
>
> Did you not follow the link in my first post? I got pretty detailed, there.
>

By the way, strace has a '-T' flag that can be used to measure the
time spent in syscalls (but for a mmap/mremap/munmap it won't be
significant).

> However, I do think that doing the performance testing before deprecating
> the previous interface would have been a good idea...
>

Once again: subprocess.Popen is actually faster than os.pipe to create
a subprocess. Just don't pass shell=True. Unless you're spawning shell
scripts, but in that case subprocess' overhead is definitely not
biggest problem.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11314>
_______________________________________


More information about the Python-bugs-list mailing list