[Rpm-maint] Feature request: Improved speed for 'rpm -qa'

Axel Liljencrantz liljencrantz at gmail.com
Tue Dec 19 01:26:31 UTC 2006


Hi,

A (hopefully small) feature request:

Would it be possible to make 'rpm -qa' fast? As in take less than a
second on modern systems? On my regular machine (2 GHz, 1000
packages), 'time rpm -qa >/dev/null' takes about 6 seconds on a cold
cache, 4 on a warm cache. On my older machine (300 MHz, 650 packages),
the same opertation takes around 40 seconds on a cold cache and 25 on
a warm cache.

The reason why I ask is that I can install apt-rpm and get such
listing in a small fraction of a second. apt-cache lets you specify a
search string e.g. 'apt-cache --no-generate pkgnames ker' only gives
you packages starting with 'ker'.

I want this feature in order to create command specific tab
completions for rpm, yum and friends. Currently the shell I'm doing
this for (fish) tries to use apt if it exists, and if it doesn't, 'rpm
-qa' is run in the background occasionally, and the output is written
to a temp file. This means that sometimes the completions are
inaccurate, and if the cache file doesn't exist, you don't get any
completions. While it works, I wouldn't say it works _well_, and the
fact that apt can use rpm as a backend to do this quickly implies that
it is possible to make it work well.

-- 
Axel



More information about the Rpm-maint mailing list