Skip to content
Snippets Groups Projects
  1. Nov 15, 2018
    • Boris Feld's avatar
      check-exec: write file in 'wcache' instead of 'cache' · 47e3f554df35
      Boris Feld authored
      Some cache are relevant or affected by the working copy used. So the `.hg/cache`
      directory is not the best place for them because multiple shared repository can
      end up fighting over them.
      
      To address this issue, we introduce a new 'wcache' directory to host this kind
      of cache.
      
      The first user are the `checkisexec` type file. These files describe property of
      the working copy and fit the use-case well.
      47e3f554df35
  2. Nov 23, 2018
    • Boris Feld's avatar
      mmapindex: set default to 1MB · 74a9f428227e
      Boris Feld authored
      mmapping index is more efficient if we only need a small part of it.
      
      The 1MB value has been picked arbitrarily, a lower value might be better.
      
      On a large repository with a 60MB index, we see the following performance
      gain:
      
      hg perfindex
      before: ! wall 0.032023 comb 0.040000 user 0.000000 sys 0.040000 (best of 100)
      after:  ! wall 0.000196 comb 0.000000 user 0.000000 sys 0.000000 (best of 1060)
      
      The speed boost benefit all cases, including the one where the full index
      needs to be parsed.
      
      hg perfindex --rev 0
      before: ! wall 0.040673 comb 0.030000 user 0.000000 sys 0.030000 (best of 100)
      after   ! wall 0.010713 comb 0.020000 user 0.010000 sys 0.010000 (best of 212)
      
      This gain reflect in higher level operation:
      
      hg perfbookmarks --clear-revlogs
      before: ! wall 0.161339 comb 0.160000 user 0.130000 sys 0.030000 (best of 56)
      after:  ! wall 0.123228 comb 0.120000 user 0.120000 sys 0.000000 (best of 68)
      74a9f428227e
    • Boris Feld's avatar
      mmapindex: move the 'mmapindexthreshold' option out of experimental · 875d2af8cb4e
      Boris Feld authored
      The option is useful and should be advertised more. We move it out of
      experimental as a first step. The `storage` section is selected as this is
      related to how the storage is accessed. A new 'performance' section might be
      more appropriate.
      
      We move from 'mmapindexthreshold` to `mmap-threshold` as non-index item are
      also suitable for mmap (eg: the rev-branch-cache).
      
      If relevant, we can introduce sub-option `mmap-threshold.revlog-index` later.
      875d2af8cb4e
  3. Dec 01, 2018
  4. Nov 23, 2018
    • Boris Feld's avatar
      perf: update perfindex to be more realistic · e207f0d6c243
      Boris Feld authored
      The previous code was creating a revlog manually, we now use the actual
      `localrepo` method to create it.
      
      We have to jump though extra hops to work around the impact of filecache.
      e207f0d6c243
  5. Dec 02, 2018
  6. Nov 22, 2018
    • Boris Feld's avatar
      match: raise an Abort error instead of OverflowError · 69bd3176da7c
      Boris Feld authored
      This case of OverflowError (one single pattern being too large) has never been
      properly caught in the past.
      69bd3176da7c
    • Boris Feld's avatar
      match: avoid translating glob to matcher multiple times for large sets · 3c842749debc
      Boris Feld authored
      For hgignore with many globs, the resulting regexp might not fit under the 20K
      length limit. So the patterns need to be broken up in smaller pieces.
      
      Before this change, the logic was re-starting the full process from scratch
      for each smaller pieces, including the translation of globs into regexp.
      Effectively doing the work over and over.
      
      If the 20K limit is reached, we are likely in a case where there is many such
      glob, so exporting them is especially expensive and we should be careful not
      to do that work more than once.
      
      To work around this, we now translate glob to regexp once and for all. Then,
      we assemble the resulting individual regexp into valid blocks.
      
      This raises a very significant performance win for large `.hgignore file`:
      
      Before: ! wall 0.153153 comb 0.150000 user 0.150000 sys 0.000000 (median of 66)
      After:  ! wall 0.059793 comb 0.060000 user 0.060000 sys 0.000000 (median of 100)
      3c842749debc
    • Boris Feld's avatar
      match: extract function that group regexps · ce401300f981
      Boris Feld authored
      ce401300f981
    • Boris Feld's avatar
      match: test for overflow error in pattern · 4e02f25f31c6
      Boris Feld authored
      If a single pattern is too large to handle, we raise an exception. This case is
      now doctested.
      4e02f25f31c6
    • Boris Feld's avatar
      8306dac48061
  7. Dec 02, 2018
    • Matt Harbison's avatar
      tests: apply binary mode to output in seq.py · 0605726179a0
      Matt Harbison authored
      I noticed this when playing with running tests using WSL, and iterating over the
      output yielded '0\r', '1\r',...  Most of the other *.py tools do this, and `seq`
      on MSYS lacks '\r' in the output, so this is more consistent.
      0605726179a0
  8. Nov 23, 2018
    • Boris Feld's avatar
      perf: add a `--clear-caches` to `perfbranchmapupdate` · 5cbb74999040
      Boris Feld authored
      This flag will help to measure the time we spend loading various cache that
      support the branchmap update.
      
      Example for an 500 000 revisions repository:
      
      hg perfbranchmapupdate --base 'not tip' --target 'tip'
      ! wall 0.000860 comb 0.000000 user 0.000000 sys 0.000000 (best of 336)
      hg perfbranchmapupdate --base 'not tip' --target 'tip' --clear-caches
      ! wall 0.029494 comb 0.030000 user 0.030000 sys 0.000000 (best of 100)
      5cbb74999040
  9. Nov 21, 2018
    • Boris Feld's avatar
      perf: start from an existing branchmap if possible · 58355a1de6b3
      Boris Feld authored
      If the --base set if a superset of one of the cached branchmap, we should use as
      a starting point. This greatly help the overall runtime of
      `hg perfbranchmapupdate`
      
      For example, for a repository with about 500 000 revisions, using this trick
      make the command runtime move from about 200 second to about 10 seconds. A 20x
      gain.
      58355a1de6b3
    • Boris Feld's avatar
      perf: rely on repoview for perfbranchmapupdate · b059388d976c
      Boris Feld authored
      Using 'repoview' matching the base and target subset make the benchmark more
      realistic. It also unlocks optimization to make the command initialization
      faster.
      b059388d976c
    • Boris Feld's avatar
      perf: pre-indent some code in `perfbranchmapupdate` · 95f35c873463
      Boris Feld authored
      This make the next patch easier to read.
      95f35c873463
    • Boris Feld's avatar
      perf: add a `perfbranchmapupdate` command · f723014677a5
      Boris Feld authored
      This command benchmark the time necessary to update the branchmap between two
      sets of revisions. This changeset introduce a first version, doing nothing fancy
      regarding cache or other internal details.
      f723014677a5
  10. Nov 05, 2018
    • Anton Shestakov's avatar
      push: config option to control behavior when pushing to a publishing server · 33d30fb1e4ae
      Anton Shestakov authored
      Pushing to a publishing server by mistake can lead to a difficult situation to
      solve because evolution doesn't work on public changesets. This new
      experimental config tries to help avoiding unintentionally (or at least being
      aware of) pushing to publishing remotes.
      
      `hg push --publish` can be used to make push succeed even when auto-publish is
      set to 'abort'.
      33d30fb1e4ae
  11. Nov 30, 2018
  12. Nov 29, 2018
  13. Nov 11, 2018
  14. Nov 17, 2018
  15. Nov 11, 2018
  16. Nov 17, 2018
  17. Nov 28, 2018
    • Martin von Zweigbergk's avatar
      match: remove obsolete catching of OverflowError · 2f14d1bbc9a7
      Martin von Zweigbergk authored
      Since 0f6a1bdf89fb (match: handle large regexes, 2007-08-19), we catch
      an OverflowError from the regex engine and split up the regex if that
      happens. In 59a9dc9562e2 (ignore: split up huge patterns, 2008-02-11),
      that was extended to raise an OverflowError in our code even if the
      regex engine doesn't raise it. It's unclear if there was a range of
      regex sizes where the OverflowError would be raised from the regex
      engine but that were still below the limit we added in our
      code. Either way, both limitations were probably removed in Python
      2.7.4 when the regex code width was extended from 16bit to 32bit (or
      Py_UCS4) integer (thanks to Yuya for finding that out).
      
      If at least the first limitation was removed, we no longer should be
      using OverflowError for flow control, so this patch changes that.
      
      Differential Revision: https://phab.mercurial-scm.org/D5309
      2f14d1bbc9a7
  18. Nov 27, 2018
  19. Oct 05, 2018
  20. Jul 02, 2017
  21. Nov 22, 2018
  22. Nov 26, 2018
  23. Nov 27, 2018
Loading