mlocate - what is it good for?
Steve Langasek
steve.langasek at ubuntu.com
Thu May 23 22:33:25 UTC 2019
On Thu, May 23, 2019 at 08:25:20PM +0200, Sebastien Bacher wrote:
> Le 22/05/2019 à 21:47, Julian Andres Klode a écrit :
> > containing about 1435134 files. mlocate foo takes 1s, find / -mount
> > -name '*foo*' takes about 7-9 secs, or 19 seconds with all mount points
> > (but there is a davfs mount of an internet server, so things might be
> Well here on a few years old 80GB intel ssd doing
> $ time find / -mount -name disco-desktop-amd64.iso
> Takes over 30 seconds (on a machine which not doing any other work)
> where mlocate takes around 1 second on the same machine... and I do
> personally find 30 seconds to be too long.
I agree that 30 seconds is too long, but as a user of find I find this usage
surprising, why would you be searching the whole root disk for the file? I
usually know a file like that is going to be in one of a few subtrees (my
homedir or /tmp or /var/lib/libvirt or something) and would be doing a more
targeted search.
Also since the locate database is only updated once a day, locate doesn't
help with this if the file I've lost is one I've downloaded today, and it
seems likely to me that files I'm looking for that aren't part of the system
data are fairly likely to fall into this category.
Anyway, agreed that 30s is too long. Would you be annoyed if the solution
to that 30s being too long was "get tired of waiting, run 'locate', get told
it's not installed, apt install mlocate, run 'locate' again"?
> Note that nautilus has a mlocate search provider which we have been
> using by default until bionic, to avoid depending on tracker. Now we use
> tracker so it's less important but some users do uninstall tracker
> because they don't like having an indexer (and it still does have some
> bugs) so it's nice to have the UI still responsive for those users.
Well, I don't think this is an argument for keeping mlocate installed by
default on desktops, because effectively this means that you have TWO
indexers on your desktop system - both tracker and mlocate. It looks like
nautilus currently depends on tracker, so I'm not sure how one would
uninstall it and usefully fall back to the mlocate backend anyway, but at
most I'd say this should be expressed as 'Depends: tracker | mlocate' in
nautilus, and not have mlocate kept around on the system updating its
database daily just in case a user removes tracker.
Thanks,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer https://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20190523/8b299688/attachment.sig>
More information about the ubuntu-devel
mailing list