Mercurial > hg
comparison mercurial/pvec.py @ 26402:05871262acd5
treemanifest: rework lazy-copying code (issue4840)
The old lazy-copy code formed a chain of copied manifests with each
copy. Under typical operation, the stack never got more than a couple
of manifests deep and was fine. Under conditions like hgsubversion or
convert, the stack could get hundreds of manifests deep, and
eventually overflow the recursion limit for Python. I was able to
consistently reproduce this by converting an hgsubversion clone of
svn's history to treemanifests.
This may result in fewer manifests staying in memory during operations
like convert when treemanifests are in use, and should make those
operations faster since there will be significantly fewer noop
function calls going on.
A previous attempt (never mailed) of mine to fix this problem tried to
simply have all treemanifests only have a loadfunc - that caused
somewhat weird problems because the gettext() callable passed into
read() wasn't idempotent, so the easy solution is to have a loadfunc
and a copyfunc.
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 25 Sep 2015 22:54:46 -0400 |
parents | bcc319d936a3 |
children | 983e93d88193 |
comparison
equal
deleted
inserted
replaced
26401:e93e12e2ff9a | 26402:05871262acd5 |
---|