[PATCH] V11 of experiment for a simpler path encoding for hashed paths (for "fncache2")

Bryan O'Sullivan bos at serpentine.com
Fri Sep 28 12:48:24 CDT 2012


On Fri, Sep 28, 2012 at 4:26 AM, Adrian Buehlmann <adrian at cadifra.com>wrote:

> V11 of experiment for a simpler path encoding for hashed paths (for
> "fncache2")
>

Right now, your patch and mine make a lot of unrepresentable characters
safe by mapping them to a single character, '~' 0x7e. This changes the sort
order of hash-encoded names in undesirable ways: for instance, it means
that files that originally began with dot or space will, once hash-encoded,
now sort *after* files that begin with alphanumeric characters.

With a hot disk cache, the effect will obviously be negligible, but with a
cold cache, it will lead to extra disk head seeks.

That possibility can easily be mitigated: instead of mapping all
unrepresentable characters to '~', just map them to a safe character that
is lexically close instead. For example, space 0x20 could be mapped to '!'
0x21, '.' 0x2e to could be mapped to ',' 0x2c, and likewise for unsafe
names such as "aux" ("auy").

This seems somewhat important to me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120928/3687d308/attachment.html>


More information about the Mercurial-devel mailing list