Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 117020 - equery --help is way too slow
Summary: equery --help is way too slow
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-28 13:16 UTC by Doug Goldstein (RETIRED)
Modified: 2006-01-05 00:36 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Goldstein (RETIRED) gentoo-dev 2005-12-28 13:16:43 UTC
# equery --help
equery dlaptop ~ # time equery --help
Usage: equery <global-opts> command <local-opts>
where <global-opts> is one of
 -q, --quiet   - minimal output
 -C, --nocolor - turn off colours
 -h, --help    - this help screen
 -V, --version - display version info
 -N, --no-pipe - turn off pipe detection
where command(short) is one of
 belongs(b) <local-opts> files... - list all packages owning files...
 changes(c)  - not implemented yet
 check(k) pkgspec - check MD5sums and timestamps of pkgspec's files
 depends(d) <local-opts> pkgspec - list all direct dependencies matching pkgspec
 depgraph(g) <local-opts> pkgspec - display a dependency tree for pkgspec
 files(f) <local-opts> pkgspec - list files owned by pkgspec
 glsa(a)  - not implemented yet
 hasuse(h) <local-opts> useflag - list all packages with useflag
 list(l) <local-opts> pkgspec - list all packages matching pkgspec
 size(s) <local-opts> pkgspec - print size of files contained in package pkgspec
 stats(t)  - not implemented yet
 uses(u) <local-opts> pkgspec - display USE flags for pkgspec
 which(w) pkgspec - print full path to ebuild for package pkgspec


real    0m15.014s
user    0m0.400s
sys     0m0.056s

This is on a Pentium M 1.8ghz laptop with 768mb RAM... should not be slow. This actually was a subsequent run... it's slower on first run.
Comment 1 Paul Varner (RETIRED) gentoo-dev 2005-12-28 13:28:50 UTC
Which version of gentoolkit?  On a Pentium III with 128 MB of RAM, I get

real    0m6.631s
user    0m1.671s
sys     0m0.180s

with gentoolkit-0.2.1_rc4.

Also how fast is emerge --help, both of them are dependent upon a 'import portage' call.
Comment 2 SpanKY gentoo-dev 2005-12-28 13:34:27 UTC
the only thing you can do here is move the --help code above the portage imports

after that, any real work that is done by equery requires portage python modules which means that you cant blame equery for being slow
Comment 3 SpanKY gentoo-dev 2005-12-28 13:46:17 UTC
didnt mean to close ...
Comment 4 Harald van Dijk (RETIRED) gentoo-dev 2005-12-28 13:48:15 UTC
For whatever it's worth:

$ time emerge -pv portage >/dev/null

real    0m1.782s
user    0m1.579s
sys     0m0.198s

$ time equery --help >/dev/null

real    0m2.357s
user    0m2.108s
sys     0m0.164s

This is with portage-2.1_pre2 and gentoolkit-0.2.1_rc4, and repeating the commands shows similar results. So I don't think it's *just* the import portage that causes delays.
Comment 5 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-01-05 00:36:56 UTC
the --help display itself requires a gentoolkit import, which will in turn import portage.  So even were you to move the portage imports around ( or late load ) you still get the impact of importing portage.  Better to work on that not being such a slow deal, or reworking equery entirely.