From owner-freebsd-ports@FreeBSD.ORG Thu Jun 17 20:30:22 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B962B16A4CF; Thu, 17 Jun 2004 20:30:22 +0000 (GMT) Received: from hourri.hittite.isp.9tel.net (hourri.hittite.isp.9tel.net [62.62.156.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7877243D2D; Thu, 17 Jun 2004 20:30:22 +0000 (GMT) (envelope-from clefevre-lists@9online.fr) Received: from pc2k (28-216-118-80.kaptech.net [80.118.216.28]) by hourri.hittite.isp.9tel.net (Postfix) with SMTP id 3B1C7157644; Thu, 17 Jun 2004 23:14:40 +0200 (CEST) Message-ID: <065a01c454a9$d5c32a00$7890a8c0@dyndns.org> From: "Cyrille Lefevre" To: References: <40D1C3C1.26556.7C76FE30@localhost> Date: Thu, 17 Jun 2004 22:29:46 +0200 Organization: ACME MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 cc: Ruslan Ermilov cc: Dan Langille Subject: Re: HEADS UP - master/slave ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jun 2004 20:30:22 -0000 "Dan Langille" 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