Skip to content
Snippets Groups Projects
  1. Nov 07, 2023
  2. Nov 06, 2023
  3. Nov 01, 2023
  4. Oct 18, 2023
    • Raphaël Gomès's avatar
      rust-matchers: fix quadratic complexity in `FileMatcher` · 687e192dae16
      Raphaël Gomès authored
      Concretely, this command:
      
      ```
      $ echo hg up -r <nodeid>; time hg revert dir1 dir2 -r <othernode> --debug
      hg up -r <nodeid>
      
      real	0m14.690s
      user	0m14.766s
      sys	0m5.430s
      ```
      
      was much slower despite using 16 cores before this change.
      The approach taken here is the same one used in match.py, in exactmatcher.
      
      This changeset was originally written by Valentin Gatien-Baron in a private
      repository.
      I have redacted the commit message and did a minor clean up of the code.
      687e192dae16
  5. Oct 27, 2023
    • Pierre-Yves David's avatar
      revlog: add a small cache of unfiltered chunk · 0250e45040f1
      Pierre-Yves David authored
      This can provides a massive boost to the reading of multiple revision and the
      computation of a valid delta chain.
      
      This greatly help operation like `hg log --patch`, delta computation (helping
      pull/unbundle), linkrev adjustment (helping copy tracing).
      
      A first round of benchmark for `hg log --patch --limit 1000` shows improvement
      in the 10-20% range on "small" repository like pypy or mercurial and large
      improvements (about 33%) for more complex ones like netbeans and mozilla's.
      
      These speeds up are consistent with the improvement to `hg pull` (from a server
      sending poor deltas) I saw benchmarking this last year. Further benchmark will
      be run during the freeze.
      
      I added some configuration in the experimental space to be able to further test
      the effect of various tuning for now. This feature should fit well in the
      "usage/resource profile" configuration that we should land next cycle.
      
      When it does not provides a benefit the overhead of the cache seem to be around
      2%, a small price for the big improvement. In addition I believe we could shave
      most of this overhead with a more efficent lru implementation.
      0250e45040f1
    • Pierre-Yves David's avatar
      revlog: minor refactor in the chunk gather process · c2d2e5b65def
      Pierre-Yves David authored
      We will introduce some caching in this method in the next changeset, we make
      some of the most "disruptive" change first as touching this could break (and
      maybe did during the development process).
      c2d2e5b65def
  6. Oct 24, 2023
    • Pierre-Yves David's avatar
      changelog-delay: move the delay/divert logic inside the (inner) revlog · d83d788590a8
      Pierre-Yves David authored
      Instead of hacking throught the vfs/opener, we implement the delay/divert logic
      inside the `_InnerRevlog` and `randomaccessfile` object. This will allow to an
      alternative implementation of the `_InnerRevlog` that does not need to use Python details.
      
      As a result, the new implementation can use the transaction less agressively
      and avoid some extra output since no data had been written yet. That seems like
      a good side effect.
      d83d788590a8
  7. Oct 26, 2023
  8. Oct 20, 2023
  9. Oct 25, 2023
  10. Oct 24, 2023
  11. Oct 19, 2023
    • Pierre-Yves David's avatar
      revlog: move entry writing in the inner object · eba138890c64
      Pierre-Yves David authored
      This is the second big piece of API we want to live on the inner object. With
      this the inner object have freedom it needs to implement things internally.
      
      (except for the delayed write feature of the changelog, that will be migrated in coming changesets)
      eba138890c64
    • Pierre-Yves David's avatar
      revlog: move `sidedata` in the inner object · 49d75cc12b8f
      Pierre-Yves David authored
      Same object as rawtext, but for sidedata.
      49d75cc12b8f
    • Pierre-Yves David's avatar
      revlog: move the `rawtext` method on the inner object · be56d322ee89
      Pierre-Yves David authored
      This is one of the current core goal of the inner object: having a "simple" API
      for some of the core revlog action, like getting a raw text, with the inner
      object able to do that part internally, on its own.
      be56d322ee89
    • Pierre-Yves David's avatar
      revlog: move the_revisioncache on the inner object · 8ec2de9c6770
      Pierre-Yves David authored
      The goal for this inner object is to compute that things we cache, it make more
      sense to have the inner object handle it directly.
      8ec2de9c6770
    • Pierre-Yves David's avatar
      revlog: move the `deltachain` method on the inner object · 30f458fc59e9
      Pierre-Yves David authored
      This is a necessary step before being able to move more logic around restoring
      a revision content there.
      
      For now, we do a simple patch for the perf extension logic, when the
      implementation of the inner object changes, we will likely need some evolution
      of the API. However this is true of many things in the perf extension. So we
      will see this later.
      30f458fc59e9
    • Pierre-Yves David's avatar
      revlog: move the `_chunks` method on the inner object · e8ad6d8de8b8
      Pierre-Yves David authored
      This is a necessary step before being able to move more logic around restoring
      a revision content there.
      
      For now, we do a simple patch for the perf extension logic, when the
      implementation of the inner object changes, we will likely need some evolution
      of the API. However this is true of many things in the perf extension. So we
      will see this later.
      e8ad6d8de8b8
  12. Oct 25, 2023
  13. Oct 19, 2023
    • Pierre-Yves David's avatar
      revlog: move the `_chunk` method on the inner object · 9c8df10ea6e0
      Pierre-Yves David authored
      This is a necessary step before being able to move more logic around restoring
      a revision content there.
      
      For now, we do a simple patch for the perf extension logic, when the
      implementation of the inner object changes, we will likely need some evolution
      of the API. However this is true of many things in the perf extension. So we
      will see this later.
      9c8df10ea6e0
  14. Oct 25, 2023
    • Pierre-Yves David's avatar
      revlog: move the compression/decompression logic on the inner object · a82704902db8
      Pierre-Yves David authored
      This is a necessary step before being able to move more logic around restoring
      a revision content there.
      
      For now, we do a simple patch for the perf extension logic, when the
      implementation of the inner object changes, we will likely need some evolution
      of the API. However this is true of many things in the perf extension. So we
      will see this later.
      a82704902db8
  15. Oct 23, 2023
  16. Oct 24, 2023
  17. Oct 18, 2023
  18. Oct 24, 2023
  19. Oct 17, 2023
    • Pierre-Yves David's avatar
      revlog: create a iteration of a _InnerRevlog object within the revlog · c3748f38dcd0
      Pierre-Yves David authored
      The goal of this object is to isolate a sub-API that can be implemented by a
      compiled object (e.g. Rust). So the boundary of this object will be arbitrary
      depending of what can we easily implemented in the Compiled code.
      
      For now, we start simple, and move the code that manage the IO objects in the
      inner object. More will come in the coming changesets.
      
      Note: the object definition could live in the different module to thin the
      `revlog.py` file, however there are other better candidate for extraction first
      and I have enought patch stacked on top of the this one for the split in this
      patch not to be worth it. So I leave this to future me.
      c3748f38dcd0
    • Pierre-Yves David's avatar
      revlog: drop the unused `_chunkcache` attribute · 118c99c6092b
      Pierre-Yves David authored
      Apparently, some time ago, the chunk cache moved in the randomaccessfile object.
      118c99c6092b
Loading