This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Attention perl maintainer: pp_system () implemented via do_aspawn () faster ?


Hello,

The cygwin subdir in the perl source tree contains a set a functions named
do_*spawn () which are based on the Cygwin spawnvp () call. That is 
presumably faster when all the parent wants to do is just start a new
process that in unix would be accomplished by a call to fork ()
followed by exec ().  Having in mind that fork is quite heavy in Cygwin
would it make sense to force pp_system () to be implemented via
the do_*spawn () instead of fork () + exec (). The can be done
by defining HAS_FORK && !defined (__CYGWIN__) in pp_system ().
Btw this is what Cygwin does in its system () call.

Has anyone tested if this solution does really speed up the pp_system ()
call ? I did some lame tests and they show improvent but the gain doesnt
seem to be so big and that is why I wonder. The test was basicaly to
use MC to copy a certain number a files out of a zip file into the file
system. For each file MC does a system () which invokes a perl script,
which then invokes via perl's system () the unzip program. I've modified
MC's system () to use Cygwin's system() instead of fork () + exec () and
perl () to use pp_system () based on do_*spawn () but the gain is not so
big really. So maybe the perl startup is much heavier than a fork and this
makes the switch to spawnvp () quite invisible ?!

Pavel

-- 
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]