After this patch compute_requiredby is used nowhere in back-end, so it can be optimized for front-end.
* Before this patch the db param wasn't used, db == localdb was supposed
* This is a minor speed-up, since we needn't calculate the whole requiredby list, if we find an ,,external' member
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
04-21-2008, 08:45 AM
Nagy Gabor
Kill compute_requiredby usage in deps.c/can_remove_package()
> Comments inline.
>
> On Sat, Apr 19, 2008 at 5:49 PM, Nagy Gabor <ngaba@bibl.u-szeged.hu>
> wrote:
> > >From 5b83eec6d87dc43a1f9dface9540220d8188edcf Mon Sep 17 00:00:00
> > >2001
> > From: Nagy Gabor <ngaba@bibl.u-szeged.hu>
> > Date: Sun, 20 Apr 2008 00:39:32 +0200
> > Subject: [PATCH] Kill compute_requiredby usage in
> > deps.c/can_remove_package()
> >
> > After this patch compute_requiredby is used nowhere in back-end,
> > so it can be optimized for front-end.
> > * Before this patch the db param wasn't used, db == localdb was
> > supposed
> In reality, we would never do this on anything but the localdb,
> correct? Can we remove the param entirely?
> We really should go through the whole backend and stop passing
> pointers to the localdb around- I believe we have it always accessible
> on the handle. Of course, whether that is the best method is up for
> discussion too.
Correct. But in deps.c almost all functions have these pointers.
>
> > * This is a minor speed-up, since we needn't calculate the whole
> > requiredby list, if we find an ,,external' member
> I have no idea what you mean by ,,external" member. Especially with
> the commas and unmatched quotes. Can you explain?
>
Oops, ,,quote' is the Hungarian "quote", sorry (in TeX style). External
refers to external member of requiredby list, which means package not
in 'targets' list. So we needn't calculate the whole requiredby list
(sometimes), we can stop if we find a package with that property.