D1622: transaction: Use intbitset for implementing changes['phase']
quark (Jun Wu)
phabricator at mercurial-scm.org
Fri Dec 8 19:31:27 EST 2017
quark added a comment.
Although this is definitely better for the clone case. intbitset does not seem to implement segmented bitsets so the memory usage could in theory be worse for other cases.
INLINE COMMENTS
> localrepo.py:1283
> tr.changes['obsmarkers'] = set()
> - tr.changes['phases'] = [set() for i in range(7)]
> + tr.changes['phases'] = [intbitset() for i in range(6)]
> tr.changes['bookmarks'] = {}
It's still worthwhile to have `set()` as a fallback. So the code runs in pure python or pypy environment
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D1622
To: joerg.sonnenberger, #hg-reviewers
Cc: quark, mercurial-devel
More information about the Mercurial-devel
mailing list