Skip to content
Snippets Groups Projects
Commit d8fa3f99debc authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

revset: stop serializing node when using "%ln"

Turning hundred of thousand of node from node to hex and back can be slow… what
about we stop doing it?

In many case were we are using node id we should be using revision id. However
this is not a good reason to have a stupidly slow implementation of "%ln".

This caugh my attention again because the phase discovery during push make an
extensive use of "%ln" or huge set. In absolute, that phase discovery probably
should use "%ld" and need to improves its algorithmic complexity, but improving
"%ln" seems simple and long overdue. This greatly speeds up `hg push` on
repository with many drafts.

Here are some relevant poulpe benchmarks:

### data-env-vars.name                             = mozilla-try-2023-03-22-zstd-sparse-revlog
  # benchmark.name                                 = hg.command.push
  # bin-env-vars.hg.flavor                         = default
  # bin-env-vars.hg.py-re2-module                  = default
  # benchmark.variants.explicit-rev                = all-out-heads
  # benchmark.variants.issue6528                   = disabled
  # benchmark.variants.protocol                    = ssh
  # benchmark.variants.reuse-external-delta-parent = default

 ## benchmark.variants.revs                        = any-1-extra-rev
8e8776a28683: 44.235070
fd1c75d9e3e5: 20.416329 (-53.85%, -23.82)
 ## benchmark.variants.revs                        = any-100-extra-rev
8e8776a28683: 49.234697
fd1c75d9e3e5: 26.519829 (-46.14%, -22.71)
parent 8e8776a28683
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment