API question: ancestors of B that are not ancestors of A

Benoit Boissinot bboissin at gmail.com
Wed Dec 9 16:31:18 CST 2009


On Wed, Dec 9, 2009 at 11:29 PM, Greg Ward <greg-hg at gerg.ca> wrote:
>
> Err, I'm a little embarassed to ask such a newbie question after I've
> been hanging around here this long, but: does revlog keep the entire
> index in memory?  I notice that any non-trivial hg-using process jumps
> to ~35-40 MB of memory ("DRS" in Linux ps terminology) with my big
> repository, and was wondering how much of 00changelog.i gets sucked
> into memory.  (Both 00changelog.i and 00manifest.i are ~6.6 MB in my
> case.)
>
> Just did a little experiment, and neither opening the repo nor calling
> changelog.tip() had much affect on memory use.  It jumped to ~35 MB on
> changelog.heads(), though.

It lazily reads the index. But anything that asks for a node instead
of a rev will trigger a full parsing of the index.

Benoit


More information about the Mercurial-devel mailing list