xrevlog: experimental reimplementation of revlog in C

Masklinn masklinn at masklinn.net
Tue Nov 9 08:49:29 CST 2010


On 2010-11-09, at 15:25 , Greg Ward wrote:
> Hi folks --
> 
> for ages now, it has really bugged me that Mercurial reads the entire
> changelog index into memory for almost any command, and that it
> creates a Python list *and* dictionary for it.  On our main repo at
> work, that's two 112,000-element containers every time you run (say)
> "hg tip".
> 
> So, back in the summer, I sat down to do something about it.  The
> result is xrevlog, a pure C library with a read-only implementation of
> revlog as it stands in Mercurial 1.6 (i.e. no support for parent delta
> or lightweight copies).  Without further ado, here is the project's
> README.txt file:

Nothing to say, except to report an analyzer warning from clang:

lib/revlog.c:707:9: warning: Value stored to 'baselen_expect' is never read
        baselen_expect = baselen = revlog->cache_data->len;
        ^                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

> clang --version
Apple clang version 1.5 (tags/Apple/clang-60)
Target: x86_64-apple-darwin10
Thread model: posix


More information about the Mercurial-devel mailing list