public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* Re: [gentoo-portage-dev] equery: deprecate --category filtering in belongs
  @ 2009-02-08  5:21 99% ` Brian Harring
  0 siblings, 0 replies; 1+ results
From: Brian Harring @ 2009-02-08  5:21 UTC (permalink / raw
  To: gentoo-portage-dev

[-- Attachment #1: Type: text/plain, Size: 1965 bytes --]

On Sun, Feb 08, 2009 at 02:07:08PM +0900, Douglas Anderson wrote:
> Hi, does anyone use --category filtering in equery belongs? I want to
> get rid of it, or at least deprecate it. My reasoning:
> 
> * We use 'equery belongs' when don't know to what package a file
> belongs. Even if we have a suspicion, most users would have to look up
> the category of the package before typing it in.
> * Even if you happen to know the exact category of the package that
> installed the file (why are you using belongs?), typing
> --category=app-portage takes more time than is saved by filtering by
> category (about 5 seconds more by my unscientific test).
> 
> Even in a script setting, I see no use for this. The time saved is minuscule:
> 
> $ time equery belongs /usr/bin/equery --category app-portage
> [ Searching for file(s) /usr/bin/equery in app-portage... ]
> app-portage/gentoolkit-0.2.4.2-r1 (/usr/bin/equery)
> 
> real    0m4.002s
> user    0m3.680s
> sys     0m0.076s
> $ time equery belongs /usr/bin/equery
> [ Searching for file(s) /usr/bin/equery in *... ]
> app-portage/gentoolkit-0.2.4.2-r1 (/usr/bin/equery)
> 
> real    0m4.205s
> user    0m3.738s
> sys     0m0.102s

You should do profiling, and *verify* category actually works; it 
should be able to make a world of difference.  Case in point via 
pkgcore-

ferringb@beast ~ $ time pquery --owns /usr/bin/equery
app-portage/gentoolkit-0.2.4.2-r1

real    0m1.162s
user    0m1.142s
sys     0m0.020s
ferringb@beast ~ $ time pquery --owns /usr/bin/equery 'app-portage/*'
app-portage/gentoolkit-0.2.4.2-r1

real    0m0.168s
user    0m0.156s
sys     0m0.011s


Yes it's not equery, but I *know* pkgcores implementation works thus 
using it to point out the speed difference if implemented correctly.

It would probably help if the category support was enabled in the 
code, also (quick check of equery shows the cat filtering is 
disabled).

~harring

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2009-02-08  5:07     [gentoo-portage-dev] equery: deprecate --category filtering in belongs Douglas Anderson
2009-02-08  5:21 99% ` Brian Harring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox