[M3devel] possible cygwin createprocess/fork cost measurements..
Olaf Wagner
wagner at elegosoft.com
Thu Mar 20 09:09:48 CET 2008
Quoting Jay <jayk123 at hotmail.com>:
> spawn(nowait) + waitpid is about the same as spawn(wait), and is
> close to system() in inflexibility, but system() has an implicit
> shell wrapper and so is slow.
To eliminate the shell wrapper you could use System.ExecuteList
from package sysutils in M3 and
q_exec( cmd ) --> int (since CM3 d5.6.0)
in quake (see quake manual on WWW), or does any Process.Create
on Windows invoke a shell on NT386GNU? I wouldn't think so
(but haven't checked).
> It seems that spawn is faster than CreateProcess at running .exes
> that use cygwin1.dll. That is a little odd. It must be something to
> do with the child startup code talking to its parent or something
> and doing so more efficiently when the immediate parent uses Cygwin.
> I might dig into that. Like, a dynamic choice between CreateProcess
> and spawn could be more efficient, but so far I'm not sure even
> using CreateProcess here is "easy enough".
>
> Is there anywhere in the cm3 tree appropriate to checkin such
> experimental code?
> I can put it in my private svn...
Yes, just create a branch:
cvs tag -b devel_process_perf_opt m3core ...
cvs up -r devel_process_perf_opt m3core ...
and you are then working on the branch, until you issue
cvs up -A m3core ...
Hope this helps,
Olaf
--
Olaf Wagner -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
More information about the M3devel
mailing list