Mercurial > public > mercurial-scm > hg-stable
diff contrib/perf.py @ 46974:3c9208702db3
revlog: replace revlog._io.size with a new revlog.index.entry_size
The `revlogio` class is mostly a relic from the past. Once in charge of the full
revlog related Input/Output code, that class gradually lost responsibilities to
the point where more IO are now done by `revlog.index` objects or revlog objects
themself. I would like to ultimately remove the `revlogio` class, to do so I
start simple with move the "entry size" information on the index. (The index is
already responsible of the binary unpacking, so it knows the size.
Differential Revision: https://phab.mercurial-scm.org/D10309
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 05 Apr 2021 12:22:25 +0200 |
parents | 92029a43debb |
children | 5e64c93d5f94 |
line wrap: on
line diff
--- a/contrib/perf.py Wed Apr 14 20:32:53 2021 +0200 +++ b/contrib/perf.py Mon Apr 05 12:22:25 2021 +0200 @@ -3228,7 +3228,10 @@ start = r.start length = r.length inline = r._inline - iosize = r._io.size + try: + iosize = r.index.entry_size + except AttributeError: + iosize = r._io.size buffer = util.buffer chunks = []