[Scons-dev] posix_spawn
Daniel Holth
dholth at gmail.com
Mon Jun 20 08:50:56 EDT 2016
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 <dragon512 at live.com> 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:scons-dev-bounces at scons.org] *On Behalf Of *Daniel
> Holth
> *Sent:* Sunday, June 19, 2016 9:55 PM
> *To:* SCons developer list <scons-dev at scons.org>
> *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
> Scons-dev at scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20160620/36888567/attachment.html>
More information about the Scons-dev
mailing list