D7313: revlog: move the nodemap into the index object (for pure)

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Fri Nov 8 14:31:02 EST 2019


indygreg added a comment.


  This seems OK to me aside from the use of `range()`, which we don't want since `len()` can be massive and this could create perf problems on Python 2.

INLINE COMMENTS

> parsers.py:53
> +        nodemap = revlogutils.NodeMap({nullid: nullrev})
> +        for r in range(0, len(self)):
> +            n = self[r][7]

We want this to be `pycompat.xrange`.

> revlog.py:211
> +        nodemap = revlogutils.NodeMap({nullid: nullrev})
> +        for r in range(0, len(self)):
> +            n = self[r][7]

`pycompat.xrange`.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7313/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7313

To: marmoute, indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list