1 |
Beau Henderson writes: |
2 |
|
3 |
> On Tue, Jul 29, 2008 at 8:38 AM, Andrey Falko <ma3oxuct@×××××.com> wrote: |
4 |
> > On Mon, Jul 28, 2008 at 2:29 PM, Andrew Gaydenko <a@××××××××.com> wrote: |
5 |
> > > |
6 |
> > > Are there (emerge/revdep-rebuild/other portage tools related) |
7 |
> > > situations when fs db creating is useful? |
8 |
> > |
9 |
> > I believe there are. I used to use slocate when I had tens of |
10 |
> > thousands of mp3s and other media files. Its a lot of times its faster |
11 |
> > to use slocate or locate than a find to find a certain file. |
12 |
> |
13 |
> I believe the OP's intentions are to determine if slocate would have any |
14 |
> benefit specifically for portage related utilities. |
15 |
> |
16 |
> And with that, there would not be any benefit to the average user IMHO, |
17 |
> as slocate is updated usually nightly ( when installed ) and as such if |
18 |
> the utilities were using the results obtained from that utility, it might |
19 |
> apply changes which would be detrimental to the system, assuming changes |
20 |
> have been made to portage or installed apps since the updatedb run. |
21 |
|
22 |
Right. Still, I like having the locate command. About those nightly |
23 |
updates.... they suck, updatedb creates much load on my systems, and the |
24 |
updatedb cronjob always just kicks in when I don't want it. But I think I |
25 |
just found a solution to this: |
26 |
|
27 |
emerge -C slocate && emerge mlocate && time updatedb && time updatedb |
28 |
|
29 |
mlocate is supposed to be compatible with slocate, but the updatedb command |
30 |
runs much faster. Well, the first time it takes a little longer, but after |
31 |
this it's fast. The website says: |
32 |
|
33 |
mlocate is a locate/updatedb implementation. The 'm' stands for "merging": |
34 |
updatedb reuses the existing database to avoid rereading most of the file |
35 |
system, which makes updatedb faster and does not trash the system caches |
36 |
as much. |
37 |
|
38 |
I don't know why it is faster to scan a directory hierarchy for its files |
39 |
than to verify which of the files in la list are still there and which new |
40 |
ones are there, but I saw the difference. |
41 |
|
42 |
Wonko |