I don't know why it is slower, just that the profiler says PyPy spends more
time there compared to CPython.

On Mon, Jun 20, 2016 at 12:40 AM Jason Kenny <[email protected]> wrote:

> Why is subprocess to slow?
>
>
>
> We have a monkey patch for this Parts ( I am unsure it was added correctly
> in to SCons yet.. think there was a desire to control the uses of posix
> spawn better) Here is a link:
>
>
> https://bitbucket.org/sconsparts/parts/src/3a389f774f234694994071d784af88c3babaad03/parts/overrides/stubprocess.py?at=master&fileviewer=file-view-default
>
>
>
> We found the posix_spawn was the better default, as cloning the process
> space for a build system ( as well as testing systems) was a speed issue.
>
>
>
>
>
> Jason
>
>
>
> *From:* Scons-dev [mailto:[email protected]] *On Behalf Of *Daniel
> Holth
> *Sent:* Sunday, June 19, 2016 9:55 PM
> *To:* SCons developer list <[email protected]>
> *Subject:* [Scons-dev] posix_spawn
>
>
>
> I found this lovely cffi implementation of posix_spawn
> https://github.com/projectcalico/python-posix-spawn . Since
> subprocess.Popen() is too slow on PyPy, this gives a welcome speedup, but
> it would probably help on CPython as well. However the file redirection is
> probably not correct.
>
> in posix.py:
>
> def exec_subprocess_spawnp(l, env):
>
>     pid = posix_spawn.posix_spawnp(l[0], l, env)
>
>     return os.waitpid(pid, 0)[1]
> _______________________________________________
> Scons-dev mailing list
> [email protected]
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
_______________________________________________
Scons-dev mailing list
[email protected]
https://pairlist2.pair.net/mailman/listinfo/scons-dev

Reply via email to