Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 209195 - PATCH: equery is slow when answering "equery belongs ..." queries, that are limited for package category
Summary: PATCH: equery is slow when answering "equery belongs ..." queries, that are l...
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-07 01:19 UTC by Ales Zoulek
Modified: 2010-03-07 05:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch against equery 0.1.4 (equery-0.1.4.patch,3.39 KB, patch)
2008-02-07 01:22 UTC, Ales Zoulek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ales Zoulek 2008-02-07 01:19:42 UTC
When issuing for example "equery -c x11-terms /usr/bin/xterm", it in fact searches contents of all packages even from other categories and filters the output AFTER that.

Attached patch solves this. It makes these queries cca 50-80 % faster.
Comment 1 Ales Zoulek 2008-02-07 01:22:06 UTC
Created attachment 142858 [details, diff]
patch against equery 0.1.4
Comment 2 michael@smith-li.com 2008-02-22 19:45:57 UTC
Was that supposed to be "equery belongs -c x11-terms /usr/bin/xterm"?
Comment 3 Ales Zoulek 2008-02-25 08:28:52 UTC
> Was that supposed to be "equery belongs -c x11-terms /usr/bin/xterm"?

Yes, sorry for typo.
Comment 4 Douglas Anderson 2010-03-07 05:03:32 UTC
Category filtering has never been enabled for belongs, and in 0.3.0, the option was removed entirely. The reason being, under what circumstance will someone know what /category/ a file comes from without having a pretty good idea of what package it came from? Considering a full 'belongs' search takes little over 3 seconds on my laptop, I imagine taking a stab at the category once or twice will actually take longer.... a lot longer. And in the case that you're pretty sure you know the category but can't quite remember a certain package name, "equery list 'some-cat/*'" should help jog your memory.

$ time equery b -e /usr/bin/gnome-terminal
 * Searching for /usr/bin/gnome-terminal ... 
x11-terms/gnome-terminal-2.26.3.1-r2 (/usr/bin/gnome-terminal)

real	0m3.253s
user	0m2.828s
sys	0m0.336s