Re: FACEPATH problem - finding the best match

Rex Monty Di Bona (
Wed, 16 Oct 1991 15:33:33 +1000

When we looked at the faces program, we decided that the directory searching
was bogus. We already had a complete hierarchy from those good old V8 days
that was addressed as domain/domain/domain/domain/user/48x48x1. We also
changed the lookup searcgh to be user then community then facepath,
for (iu = 0; iuser[iu] != NULL; iu++)
for (ic = 0; icomm[ic] != NULL; ic++)
for (id = 0; facepath[id] != NULL; id++)
which is what we believe is a closer reflection of how a 'normal person' would
look things up. This reduces the directory search at each level, as we now
have smaller directories. The top level directory is:

$ ls /n/icon
ETC ch faces is nl su
MISC cl fi it no th
MISC.old com fr jp nz uk
README cr gov kr org us
ar cs gr others usa
at de hu mil oz uucp
au dk ie mx pt yu
be edu il my se za
ca es in net sg

It also, we believe, makes it easier to add new users/domains, and to
have links (oz is a link to au/oz for historical reasons :-)

We also search 'backwards' in the hierarchy, so the more exact match
is found first.

For those concerned with efficiency, the directories that are used most often,
ie, the local machine, would be kept in 'cache' by the machine. Since the
directories are now smaller, the directory search should be performed faster


P.s. If there is interest we can post the diffs to patch to this format.