Skip to content
Snippets Groups Projects
  1. Jul 31, 2024
    • Raphaël Gomès's avatar
      rust-revlog: generalize an error message · c90e0f65
      Raphaël Gomès authored
      This is used for more than the nodemap data.
      c90e0f65
    • Raphaël Gomès's avatar
      rust-revlog: don't create an in-memory nodemap for filelogs from Python · bcd4962e
      Raphaël Gomès authored
      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)
      ```
      bcd4962e
    • Raphaël Gomès's avatar
      rust-revlog: move non-persistent-nodemap rev lookup to the index · 1da69958
      Raphaël Gomès authored
      It only uses index features and does not need to be on the revlog. A later
      patch will make use of this function from a different context.
      1da69958
  2. Jul 29, 2024
    • Raphaël Gomès's avatar
      revlog: add glue to use a pure-Rust VFS · 72bc29f0
      Raphaël Gomès authored
      This will save us a lot of calling back into Python, which is always
      horribly expensive.
      
      We are now faster in all benchmarked cases except for `log --patch`
      specifically on mozilla-try. Fixing this will happen in a later patch.
      
      ```
      ### data-env-vars.name            = mercurial-devel-2024-03-22-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
      e679697a6ca4: 1.760765  ~~~~~
      5559d7e63ec3: 1.555513  (-11.66%, -0.21)
      ### 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
      e679697a6ca4: 62.848869  ~~~~~
      5559d7e63ec3: 58.113051   (-7.54%, -4.74)
      ### 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
      e679697a6ca4: 3.173532  ~~~~~
      5559d7e63ec3: 3.543591  (+11.66%, +0.37)
      ### 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  = 1000
        # benchmark.variants.patch      = no
        # benchmark.variants.rev        = none
      e679697a6ca4: 1.214698  ~~~~~
      5559d7e63ec3: 1.192478   (-1.83%, -0.02)
      ### data-env-vars.name            = mozilla-unified-2024-03-22-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
      e679697a6ca4: 56.205474  ~~~~~
      5559d7e63ec3: 51.520074   (-8.34%, -4.69)
      ### data-env-vars.name            = mozilla-unified-2024-03-22-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
      e679697a6ca4: 2.105419  ~~~~~
      5559d7e63ec3: 2.051849   (-2.54%, -0.05)
      ### data-env-vars.name            = mozilla-unified-2024-03-22-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  = 1000
        # benchmark.variants.patch      = no
        # benchmark.variants.rev        = none
      e679697a6ca4: 0.309960  ~~~~~
      5559d7e63ec3: 0.299035   (-3.52%, -0.01)
      ### data-env-vars.name            = tryton-public-2024-03-22-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
      e679697a6ca4: 1.849832  ~~~~~
      5559d7e63ec3: 1.805076   (-2.42%, -0.04)
      ### data-env-vars.name            = tryton-public-2024-03-22-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
      e679697a6ca4: 0.289521  ~~~~~
      5559d7e63ec3: 0.279889   (-3.33%, -0.01)
      ### data-env-vars.name            = tryton-public-2024-03-22-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  = 1000
        # benchmark.variants.patch      = no
        # benchmark.variants.rev        = none
      e679697a6ca4: 0.332270  ~~~~~
      5559d7e63ec3: 0.323324   (-2.69%, -0.01)
      ```
      72bc29f0
    • Raphaël Gomès's avatar
      fncache: add attribute to check whether we're using dotencode · bd43465a
      Raphaël Gomès authored
      This will make it easy to know if we can use the Rust implementation that
      doesn't support older forms of encoding.
      bd43465a
    • Raphaël Gomès's avatar
      fncachestore: add typing information · 9fbdf355
      Raphaël Gomès authored
      This helps with autocomplete.
      9fbdf355
    • Raphaël Gomès's avatar
      fncache: refactor load check into a property · ba9df4e6
      Raphaël Gomès authored
      This makes the intent more obvious new callers less prone to error.
      ba9df4e6
    • Raphaël Gomès's avatar
      hg-core: add FnCacheVFS · 067ec857
      Raphaël Gomès authored
      This will allow us to only call back into Python to add items to the fncache,
      which should save us a lot of FFI overhead.
      
      This is also of course a stepping stone for more pure Rust work.
      067ec857
    • Raphaël Gomès's avatar
      hg-core: add a complete VFS · 7be39c51
      Raphaël Gomès authored
      This will be used from Python in a later change.
      
      More changes are needed in hg-core and rhg to properly clean up the APIs
      of the old VFS implementation but it can be done when the dust settles
      and we start adding more functionality to the pure Rust VFS.
      7be39c51
    • Raphaël Gomès's avatar
      hg-core: add fncache module · 1a8466fd
      Raphaël Gomès authored
      For now it's only a super simple trait. It will be used for calling back into
      Python soon, and later will be fleshed out into a full fncache.
      1a8466fd
  3. Sep 26, 2024
  4. Jun 19, 2024
    • Raphaël Gomès's avatar
      rust-changelog: switch away from deprecated APIs for datetime use · 6b7ffa3f
      Raphaël Gomès authored
      This was caught by clippy, nothing was changed aside from some light API
      changes.
      6b7ffa3f
    • Raphaël Gomès's avatar
      revlog: add the glue to use the Rust `InnerRevlog` from Python · 7346f93b
      Raphaël Gomès authored
      The performance of this has been looked at for quite some time, and some
      workflows are actually quite a bit faster than with the Python + C code.
      
      However, we are still (up to 20%) slower in some crucial places like cloning
      certain repos, log, cat, which makes this an incomplete rewrite. This is
      mostly due to the high amount of overhead in Python <-> Rust FFI, especially
      around the VFS code. A future patch series will rewrite the VFS code in
      pure Rust, which should hopefully get us up to par with current perfomance,
      if not better in all important cases.
      
      This is a "save state" of sorts, as this is a ton of code, and I don't want
      to pile up even more things in a single review.
      
      Continuing to try to match the current performance will take an extremely
      long time, if it's not impossible, without the aforementioned VFS work.
      7346f93b
    • Raphaël Gomès's avatar
      changelog: also set the general delta config flag in the data config · 13815c9d
      Raphaël Gomès authored
      This duplication is dubious, but it's a decision to be made at a later date,
      this is the fix.
      13815c9d
  5. Jul 29, 2024
  6. Oct 10, 2024
    • Raphaël Gomès's avatar
      rust-revlog: add a Rust-only `InnerRevlog` · e01e84e5
      Raphaël Gomès authored
      This mirrors the Python `InnerRevlog` and will be used in a future patch
      to replace said Python implementation. This allows us to start doing more
      things in pure Rust, in particular reading and writing operations.
      
      A lot of changes have to be introduced all at once, it wouldn't be very
      useful to separate this patch IMO since all of them are either interlocked
      or only useful with the rest.
      e01e84e5
    • Raphaël Gomès's avatar
      rust-index: fix the computation of data start · 44823c50
      Raphaël Gomès authored
      This was falling into place instead of being correct, we clean up the logic
      by differenciating the on-disk offset and the actual start of the data
      more cleanly.
      44823c50
    • Raphaël Gomès's avatar
      rust-index: return an error on a bad index header · f2eab496
      Raphaël Gomès authored
      This is more idiomatic and allows us to better handle the problem later.
      f2eab496
  7. Oct 17, 2024
  8. Sep 25, 2024
  9. Oct 29, 2024
  10. Oct 27, 2024
  11. Oct 28, 2024
  12. Oct 25, 2024
    • Pierre-Yves David's avatar
      evolution: stop wrongly flagging unrelated part of a split as divergent · e68fe567
      Pierre-Yves David authored
      Before this change, divergence introduced by successors of a split would "spill"
      to other unrelated successors of the split that were not ambiguous.
      
      This small changes fixes it.
      
      Thanks goes to Manuel Jacobs for the discussion leading to this realization that
      a new simple and correct definition could be found.
      e68fe567
  13. Oct 27, 2024
    • Matt Harbison's avatar
      tests: skip doctests that use `time.tzset()` on Windows · cf8d029a
      Matt Harbison authored
      There's no way to conditionally skip the tests for a function (see the inline
      feature request).  That leaves us with the choice to either put the whole
      `mercurial.utils.dateutil` module in the skip list of this script (but then this
      script prints out the module as unexpectedly not tested, and misses a bunch of
      tests that can be run), blacklist the test entirely (but that makes it harder to
      work with on Windows), or use this hack to look for the statement that is
      broken, and skip the test currently attached to one function.
      
      (It appears that an example in the list of examples corresponds to a single
      `>>>` block, and the `test` itself corresponds to a single function.  So prescan
      the examples, and skip all of them when the statement is found in any, since the
      setup of setting the timezone has an effect on subsequent examples.)
      cf8d029a
Loading