diff mercurial/revlog.py @ 52304:bcd4962e0df9

rust-revlog: don't create an in-memory nodemap for filelogs from Python Explanations inline. Benchmarks from this change affect positively the only repo that showed this being a problem: ``` ### data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm # benchmark.name = hg.command.cat # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.files = all-root # benchmark.variants.output = plain # benchmark.variants.rev = tip default: 62.848869 ~~~~~ before-this-patch: 58.113051 (-7.54%, -4.74) this-patch: 57.407533 (-8.66%, -5.44) ### data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm # benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.limit-rev = 10 # benchmark.variants.patch = yes # benchmark.variants.rev = none default: 3.173532 ~~~~~ before-this-patch: 3.543591 (+11.66%, +0.37) this-patch: 3.297235 (+3.90%, +0.12) ```
author Rapha?l Gom?s <rgomes@octobus.net>
date Wed, 31 Jul 2024 13:35:54 +0200
parents 72bc29f01570
children 4eec920bbb37
line wrap: on
line diff
--- a/mercurial/revlog.py	Wed Jul 31 15:02:55 2024 +0200
+++ b/mercurial/revlog.py	Wed Jul 31 13:35:54 2024 +0200
@@ -1870,6 +1870,7 @@
                 chunk_cache=chunk_cache,
                 default_compression_header=default_compression_header,
                 revlog_type=self.target[0],
+                use_persistent_nodemap=self._nodemap_file is not None,
             )
             self.index = RustIndexProxy(self._inner)
             self._register_nodemap_info(self.index)