# HG changeset patch # User Gregory Szorc # Date 1456641258 28800 # Node ID 86de91c56355085d15ff7239fa439d2109cfb4b4 # Parent 1778770e198244405bdb5f435e9b4186ccbc6adc changelog: lazy decode user (API) This appears to show a similar speedup as the previous patch. diff -r 1778770e1982 -r 86de91c56355 mercurial/changelog.py --- a/mercurial/changelog.py Sat Feb 27 22:25:14 2016 -0800 +++ b/mercurial/changelog.py Sat Feb 27 22:34:18 2016 -0800 @@ -337,7 +337,7 @@ Returns a 6-tuple consisting of the following: - manifest node (binary) - - user (encoding.localstr) + - user (binary) - (time, timezone) 2-tuple of a float and int offset - list of files modified by the cset - commit message / description (binary) @@ -350,7 +350,7 @@ desc = text[last + 2:] l = text[:last].split('\n') manifest = bin(l[0]) - user = encoding.tolocal(l[1]) + user = l[1] tdata = l[2].split(' ', 2) if len(tdata) != 3: diff -r 1778770e1982 -r 86de91c56355 mercurial/context.py --- a/mercurial/context.py Sat Feb 27 22:25:14 2016 -0800 +++ b/mercurial/context.py Sat Feb 27 22:34:18 2016 -0800 @@ -548,7 +548,7 @@ return self._changeset[0] def user(self): - return self._changeset[1] + return encoding.tolocal(self._changeset[1]) def date(self): return self._changeset[2] def files(self):