On Mon, Jun 06, 2005 at 05:00:15AM +0200, Bas van Gompel wrote:
> Hallo James,
> 
> Op Tue, 31 May 2005 03:44:02 +0200 (MET DST) schreef ik
> in <[EMAIL PROTECTED]>:
> [...]
> :  Suggested ChangeLog entry:
> :
> :  2005-05-31  Bas van Gompel  <[EMAIL PROTECTED]>
> :
> :     * locate/locate.c: Fold case once, only when needed.
> 
> Could you please confirm receiving the above mail, and the patch
> it refers to?

Yes, I've received the patch.   Thanks for your help.

> Any comments?

When we discussed this functionality earlier, I mentioned that it used
to be the case that findutils would fold the case of each character
once (or never if not required).  It used to cope intelligently with
case-folding when dealing with LOCATE02 databases, too (that is, it
didn't repeatedly case-fold repeated prefixes).  I indicated that I
had sacrificed this optimisation when refactoring the tests.

I've since been thinking that the bits of code that read from the
database should be more decoupled.  That would also allow us to tell
the database backend whether we need it to do case folding.  That wold
bring us back to a situation where we can regain the optimisation, and
may also allow us to support additional database formats more neatly.
One that comes to mind is gzip, which should produce a locate database
less than half the size:-

$ /usr/local/bin/locate -d  /usr/local/var/locatedb  '?*'  | gzip -9 > 
filenames.gz
[EMAIL PROTECTED]:~$ ls -l filenames.gz /usr/local/var/locatedb -rw-r--r--  1 
james users 2188446 2005-06-06 05:54 filenames.gz
-rw-r--r--  1 root  staff 4792566 2005-06-05 06:28 /usr/local/var/locatedb

So, I'm thinking about reorganising "locate" to decouple the database
reading code a bit more, which is why I haven't applied the patch
(yet).

Regards,
James.



_______________________________________________
Bug-findutils mailing list
Bug-findutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-findutils

Reply via email to