cvs2hg memory use

Greg Ward greg-hg at gerg.ca
Mon Aug 3 16:58:28 CDT 2009


On Mon, Aug 3, 2009 at 5:47 PM, Greg Ward<greg-hg at gerg.ca> wrote:
> 1.1.1: starts around 23 MB, slowly creeps up to 33 MB after 4000 commits
> 1.2.1: similar
> 1.3.1: starts around 24 MB, but grows very quickly: 388 MB after 1300 commits,
>          die with MemoryError after ~1300 MB and ~2400 commits
[...]
> One oddity: cvs2svn disables garbage collection because it takes pains
> to create no cyclic data structures.  Mercurial presumably takes no
> such pains, and would no doubt benefit from occasional GC.  In fact,
> I'm going to add a gc.collect() call right at the end of the above
> method and see if it helps.

As expected, a gc.collect() after every commit keeps memory use quite
constant.  A more reasonable approach, countermanding cvs2svn's
default with a call to gc.enable() at the begninning of the
conversion, works almost as well but presumably with less of a
performance hit. (But the memory profile in this case is still
noticeably worse than under 1.1 or 1.2 without GC: DRS creeps as high
as 50 MB after 4000 commits, versus 33 MB under Hg 1.1.)

Still curious what changed in 1.3.  I might write a little test script
and bisect this anyways, just for the heck of it.

Greg



More information about the Mercurial-devel mailing list