# HG changeset patch # User Pierre-Yves David # Date 1710326308 -3600 # Node ID b4a6a1ff8fce2b240f26388f2701e30f98b52fd1 # Parent 6378d57562af5416af3a4b45267e5d28aa9f6ac3 tags-cache: skip the filternode step if we are not going to use it When warming the hgtagsfnodescache, we don't need the actual result, so we can simply skip the part that "filter" fnode we read from the cache. So provide a quite visible speed up to the top level `hg debugupdatecache` function. ### data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog # benchmark.name = hg.debug.debug-update-cache # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.pre-state = warm before: 19.947581 after: 18.916804 (-5.17%, -1.03) diff -r 6378d57562af -r b4a6a1ff8fce mercurial/tags.py --- a/mercurial/tags.py Wed Mar 13 11:34:21 2024 +0100 +++ b/mercurial/tags.py Wed Mar 13 11:38:28 2024 +0100 @@ -83,7 +83,9 @@ def warm_cache(repo): """ensure the cache is properly filled""" unfi = repo.unfiltered() - fnoderevs(repo.ui, unfi, unfi.changelog.revs()) + tonode = unfi.changelog.node + nodes = [tonode(r) for r in unfi.changelog.revs()] + _getfnodes(repo.ui, repo, nodes) def fnoderevs(ui, repo, revs):