Patchwork D8408: nodemap: skip persistent nodemap warming for revlog not using it

login
register
mail settings
Submitter phabricator
Date April 15, 2020, 11:59 a.m.
Message ID <47752fd695875005b5bd6e68fb42b7ac@localhost.localdomain>
Download mbox | patch
Permalink /patch/46118/
State Not Applicable
Headers show

Comments

phabricator - April 15, 2020, 11:59 a.m.
marmoute updated this revision to Diff 21089.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8408?vs=21056&id=21089

BRANCH
  default

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

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

AFFECTED FILES
  mercurial/revlogutils/nodemap.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/revlogutils/nodemap.py b/mercurial/revlogutils/nodemap.py
--- a/mercurial/revlogutils/nodemap.py
+++ b/mercurial/revlogutils/nodemap.py
@@ -112,6 +112,11 @@ 
     To be used for updating the nodemap on disk outside of a normal transaction
     setup (eg, `debugupdatecache`).
     """
+    if revlog._inline:
+        return  # inlined revlog are too small for this to be relevant
+    if revlog.nodemap_file is None:
+        return  # we do not use persistent_nodemap on this revlog
+
     notr = _NoTransaction()
     _persist_nodemap(notr, revlog)
     for k in sorted(notr._postclose):