Date: Thu, 17 Jun 2004 22:29:46 +0200 From: "Cyrille Lefevre" <clefevre-lists@9online.fr> To: <ports@freebsd.org> Cc: Dan Langille <dan@langille.org> Subject: Re: HEADS UP - master/slave ports Message-ID: <065a01c454a9$d5c32a00$7890a8c0@dyndns.org> References: <40D1C3C1.26556.7C76FE30@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
"Dan Langille" <dan@langille.org> wrote: > On 17 Jun 2004 at 16:50, Cyrille Lefevre wrote: [snip] > > there is no need to fork any sub-processes : > > > > # Try to determine if we are a slave port. These variables are used by > > # FreshPorts and portsmon, but not yet by the ports framework itself. > > _MASTERDIR= ${MASTERDIR:C,/([^/]+)/\.\.,,:C,/([^/]+)/\.\.,,} > > > > .if ${_MASTERDIR} != ${.CURDIR} > > IS_SLAVE_PORT?= yes > > # take your pick : > > # _PORTSDIR= ${_MASTERDIR:C|([^/]+/[^/]+)/?$||} > > # MASTERPORT= ${_MASTERDIR:C|${_PORTSDIR}||} > > real 15m24.018s > user 10m39.785s > sys 4m35.054s > > > # or > > MASTERPORT= ${_MASTERDIR:H:T}/${_MASTERDIR:T} > > real 15m23.343s > user 10m39.088s > sys 4m34.888s > > > .else > > IS_SLAVE_PORT?= no > > MASTERPORT= > > .endif > > These appear to be slightly faster than the previous stats I posted. > Everything is pratically identical in user time. sys is where the > savings are being made. it's strange that this code (w/ no fork) is not much faster than 2 forks ! Ruslan, do you have any idea about that ? CC -make maintainer Cyrille Lefevre. -- mailto:clefevre-lists@9online.fr
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?065a01c454a9$d5c32a00$7890a8c0>