[patch] pkg_delete(1) speedup

2008-03-26 Thread Pav Lucistnik
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 th

Re: [patch] pkg_delete(1) speedup

2008-03-26 Thread Roman Divacky
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 pac

Re: [patch] pkg_delete(1) speedup

2008-03-27 Thread Doug Barton
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 dep

Re: [patch] pkg_delete(1) speedup

2008-03-28 Thread Roman Divacky
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 routi

Re: [patch] pkg_delete(1) speedup

2008-03-28 Thread Doug Barton
Roman Divacky wrote: 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 Think of it as good practice. :) Seriously though, it does make the CVS history a little easier to examine. Your best

Re: [patch] pkg_delete(1) speedup

2008-03-31 Thread soralx
> > 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 rd

Re: [patch] pkg_delete(1) speedup

2008-03-31 Thread Roman Divacky
On Sun, Mar 30, 2008 at 11:49:46PM -0700, [EMAIL PROTECTED] 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 >

Re: [patch] pkg_delete(1) speedup

2008-03-31 Thread Pav Lucistnik
[EMAIL PROTECTED] píše v ne 30. 03. 2008 v 23:49 -0700: > Notice pkg_info in ^T output during "Checking if x11/rxvt-unicode already > installed" phase. This one takes awhile. The actual command is: > `/usr/sbin/pkg_info -q -O x11/rxvt-unicode` > real0m37.697s > user0m0.125s > sys 0m

Re: [patch] pkg_delete(1) speedup

2008-03-31 Thread Michel Talon
Roman Divacky wrote: > To my eye, it doesn't look like matchbyorigin() could be > re-implemented > to be faster with little effort, but could somebody have a quick look > as well? Would doing mmap() instead of scanning file line-by-line be > any faster? (though I'm not saying it's a great idea) I