From owner-freebsd-ports@FreeBSD.ORG Mon Aug 4 18:28:23 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 501A7106567E for ; Mon, 4 Aug 2008 18:28:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx23.fluidhosting.com [204.14.89.6]) by mx1.freebsd.org (Postfix) with ESMTP id EC2398FC15 for ; Mon, 4 Aug 2008 18:28:22 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 32246 invoked by uid 399); 4 Aug 2008 18:28:22 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 4 Aug 2008 18:28:22 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <48974A43.1010801@FreeBSD.org> Date: Mon, 04 Aug 2008 11:28:19 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.16 (X11/20080726) MIME-Version: 1.0 To: "V.Chukharev" References: <08GlBzRclM@dmeyer.dinoex.sub.org> <488A0B2E.9070403@FreeBSD.org> <488F79F8.1030105@FreeBSD.org> <48969F94.2060100@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 0.95.6 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: Dirk Meyer , freebsd-ports@freebsd.org Subject: Re: Mk/bsd.openssl.mk optimization X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Aug 2008 18:28:23 -0000 V.Chukharev wrote: > On Mon, 04 Aug 2008 09:20:04 +0300, Doug Barton wrote: > >> Vladimir Chukharev wrote: >>> On Tue, 29 Jul 2008 23:13:44 +0300, Doug Barton >>> wrote: >>> >>>> V.Chukharev wrote: >>>>> Another patch, just one line. It can be applied independently >>>>> from the patch for bsd.port.subdir.mk. >>>> I use: grep -l "@comment ORIGIN:${1}$" $pdb/*/+CONTENTS for >>>> similar purposes in portmaster with no complaints so far. Is >>>> there a reason you need to do the complicated thing? >>> I am a bit worried by the size of * expansion. >> I'm starting to wonder if you've actually tested and/or benchmarked > > Not very deeply, you are right. Well that's a relief to know that my "perception of reality" filter isn't totally out of whack. :) >> this stuff. I've run tests of the construction above for 5,000 >> directories which is way more ports than a user would ever have >> installed. Rerunning this contrived example: > > Ok, that means that the limit is between 5000 and 6721: > > $ ls /var/db/pkg/*/+* You're still comparing apples and oranges. The correct command to test what we're trying to improve would be 'ls /var/db/pkg/*/+CONTENTS'. Remember that there are at least 4 and sometimes 5 files in each pkg directory. Again in my contrived example, /home/dougb/testglob/*/file works with 8,426 directories, fails with 8,427. I think that's more than enough safety margin for the forseeable future, and if the system ever exploded to the point that any user had more than 8,426 ports installed the stuff can always be fixed. :) In any case I do agree that getting rid of grep -r is a noble goal, I'm glad that you looked into this. Doug -- This .signature sanitized for your protection