[patch] pkg_delete(1) speedup

Roman Divacky rdivacky at FreeBSD.org
Fri Mar 28 01:23:13 PDT 2008

On Thu, Mar 27, 2008 at 07:18:49PM -0700, Doug Barton wrote:
> Roman Divacky wrote:
> >On Wed, Mar 26, 2008 at 05:18:29PM +0100, Pav Lucistnik wrote:
> >>You might have noticed a thread on the mailing list called "ports system
> >>woes". The submitter pointed out an inefficiency in pkg_delete routine,
> >>that parses the whole /var/db/pkg over and over again for every
> >>dependency of a package being removed.
> >>
> >>Attached is a patch by rdivacky that implements the idea of looking up
> >>all the values in a single pass over /var/db/pkg content.
> >
> >I hacked a slightly better patch that coveres a part of pkg_add too..
> >
> >please review/test on:
> >
> >	www.vlakno.cz/~rdivacky/pkg_tools.patch
> >
> >comments, benchmarks more than welcome!
> A) this is massively cool stuff, thanks for taking this on. :)
> B) you should probably do two versions of the patch, one with 
> style(9)-only changes, and one without. The former makes it much easier 
> to review the actual changes, and would speed your path to getting it in 
> the tree.

there are 3 style-only changes in the patch.. 3 lines.. I didnt consider
to make two separate patches for testing/review :)

I'll do it if you insist....

thnx! roman

More information about the freebsd-ports mailing list