FYI, here's why dlocate is still useful.

uncached (i.e. first run):

ganesh:~# time dpkg -S /usr/bin/evince
evince: /usr/bin/evince

real 0m6.745s   user 0m1.800s   sys 0m0.892s

ganesh:~# time dlocate '/usr/bin/evince$'
evince: /usr/bin/evince

real 0m0.483s   user 0m0.100s   sys 0m0.064s


nearly 7 seconds vs about half a second.

this is on a machine with a fast SATA 3 SSD (Patriot Wildfire 120GB), a
Phenom II 1090T running at 3.7GHz, and 16GB of DDR3-1333 RAM. dpkg is
*much* slower on lesser machines. dlocate is also slower, but nowhere
near as much.

dlocate achieves this speed by concatenating the file listings to a
single file in a nightly cron job, and running a simple grep on the
result.  A long time ago, it used to use frcode and locate, but it turns
out that grepping a text file is much faster.


cached (2nd run):

ganesh:~# time dpkg -S /usr/bin/evince
evince: /usr/bin/evince

real 0m1.161s   user 0m0.944s   sys 0m0.212s

ganesh:~# time dlocate '/usr/bin/evince$'
evince: /usr/bin/evince

real 0m0.074s   user 0m0.028s   sys 0m0.032s

1.6 seconds versus effectively instantaneous.




i'm more than happy to modify dlocate to work with whatever command-line
options dpkg (or the various apt* tools) provides to give access to the
package file lists.

alternatively, if similar search capability is available in apt-cache or
aptitude or some other tool, i'm happy to use them too.

AFAIK, while some other tools now provide some of the functionality that
dlocate does there are still a few features of dlocate that are not
provided by any alternative tool.

craig

-- 
craig sanders <c...@taz.net.au>

BOFH excuse #155:

Dumb terminal



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to