Skip to content
Snippets Groups Projects
  1. Aug 19, 2017
  2. Sep 23, 2017
  3. Sep 24, 2017
  4. Sep 14, 2017
  5. Jun 14, 2017
  6. Sep 21, 2017
  7. Sep 12, 2017
  8. Sep 13, 2017
    • Mark Thomas's avatar
      revlog: add option to mmap revlog index · 3c969172
      Mark Thomas authored
      Following on from Jun Wu's patch last October[1], we have found that using mmap
      for the revlog index in repos with large revlogs gives a noticable performance
      improvment (~110ms on each hg invocation), particularly for commands that don't
      touch the index very much.
      
      This changeset adds this as an option, activated by a new experimental config
      option so that it can be enabled on a per-repo basis. The configuration option
      specifies an index size threshold at which Mercurial will switch to using mmap
      to access the index.
      
      If the configuration option is not specified, the default remains to load the
      full file, which seems to be the best option for smaller repos.
      
      Some initial performance numbers for average of 5 invocations of `hg log -l 5`
      for different cache states:
      
      | Repo: | HG | FB |
      |---|---|---|
      | Index size: | 2.3MB | much bigger |
      | read (warm): | 237ms | 432ms |
      | mmap (warm): | 227ms | 321ms |
      |   | (-3%) | (-26%) |
      | read (cold): | 397ms | 696ms |
      | mmap (cold): | 410ms | 888ms |
      |   | (+3%) | (+28%) |
      
      [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-October/088737.html
      
      Test Plan:
      `hg log --config experimental.mmapindex=true`
      
      Differential Revision: https://phab.mercurial-scm.org/D477
      3c969172
  9. Sep 21, 2017
  10. Sep 20, 2017
  11. Sep 03, 2017
    • Pulkit Goyal's avatar
      copytrace: use the full copytracing method if only drafts are involved · fc3b8483
      Pulkit Goyal authored
      This patch adds the functionality to use the full copytracing even if
      `experimental.copytrace = heuristics` in cases when drafts are involved.
      
      This is also a part of copytrace extension in fbext.
      
      This also adds tests which are also taken from fbext.
      
      .. feature::
      
         The `heuristics` option for `experimental.copytrace` performs full
         copytracing if both source and destination branches contains non-public
         changsets only.
      
      Differential Revision: https://phab.mercurial-scm.org/D625
      fc3b8483
  12. Sep 15, 2017
  13. Sep 19, 2017
  14. Sep 15, 2017
  15. Sep 18, 2017
  16. Sep 19, 2017
  17. Sep 18, 2017
  18. Sep 07, 2017
  19. Sep 18, 2017
  20. Sep 02, 2017
    • Jun Wu's avatar
      revset: move weight information to predicate · b0790beb
      Jun Wu authored
      Previously revset weight is hardcoded and cannot be modified. This patch
      moves it to predicate so newly registered revsets could define their weight
      to properly give static optimization some hint.
      
      Differential Revision: https://phab.mercurial-scm.org/D657
      b0790beb
    • Jun Wu's avatar
      revset: remove "small" argument from "_optimize" · 53fb09c7
      Jun Wu authored
      `_optimize` calculates weights of subtrees. "small" affects some weight
      calculation (either 1 or 0.5). The weights are now only useful in `and`
      optimization where we might swap two arguments and use `andsmally`.
      
      In the real world, it seems unlikely that revsets with weight of 0.5 or 1
      matters the `and` order optimization. I think the important thing is to get
      weights of expensive revsets right (ex. `contains`).
      
      This patch removes the `small` argument to simplify the interface.
      
      As for choosing between 0.5 vs 1, things returning a single revision
      (`ancestor`, `string`) has a weight of 0.5. Things returning multiple
      revisions returns 1. This could be sometimes useful in the `andsmally`
      optimization, ex.
      
        (((:)-2) & expensive()) & ((1-2) & expensive())
          ^^^                       ^
         ^^^^^^^                   ^^^^^
        ^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^^^^
          weight=1                 weight=0.5
      
      would have an `andsmally` optimization so `1-2` gets executed first, which
      seems to be desirable.
      
      Differential Revision: https://phab.mercurial-scm.org/D656
      53fb09c7
  21. Sep 18, 2017
  22. Sep 19, 2017
Loading