Date: Mon, 04 Aug 2008 11:28:19 -0700 From: Doug Barton <dougb@FreeBSD.org> To: "V.Chukharev" <chukharev@mail.ru> Cc: Dirk Meyer <dirk.meyer@dinoex.sub.org>, freebsd-ports@freebsd.org Subject: Re: Mk/bsd.openssl.mk optimization Message-ID: <48974A43.1010801@FreeBSD.org> In-Reply-To: <op.ufc9w5ny0g54sc@localhost> References: <op.ueqfl1xy0g54sc@localhost> <08GlBzRclM@dmeyer.dinoex.sub.org> <op.ueumske80g54sc@localhost> <op.ueuwd8rs0g54sc@localhost> <488A0B2E.9070403@FreeBSD.org> <op.ue17xeex0g54sc@localhost> <op.ue2j4tv60g54sc@localhost> <488F79F8.1030105@FreeBSD.org> <op.ue3brjk0pcmiy5@localhost> <48969F94.2060100@FreeBSD.org> <op.ufc9w5ny0g54sc@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
V.Chukharev wrote: > On Mon, 04 Aug 2008 09:20:04 +0300, Doug Barton <dougb@freebsd.org> wrote: > >> Vladimir Chukharev wrote: >>> On Tue, 29 Jul 2008 23:13:44 +0300, Doug Barton <dougb@freebsd.org> >>> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48974A43.1010801>