Skip to content
Snippets Groups Projects
  1. Nov 03, 2022
  2. Oct 16, 2022
    • Pierre-Yves David's avatar
      perf-unbundle: do a quick and dirty fix to make it run on more commit · 27bff608
      Pierre-Yves David authored
      Without this change, the perf commands fails within the
      f67741e8264b::18415fc918a1 range (boundary excluded).
      
      Check inline comment for details.
      
      With this fix, the command is able to run on this range, with a slightly
      different behavior (as no revset is "uninlined"). However this is still much
      better than not being able to run anything in this range. Especially because
      that range do see some performance regression for unbundle.
      27bff608
  3. Oct 18, 2022
  4. Oct 19, 2022
  5. Nov 03, 2022
    • Raphaël Gomès's avatar
      rhg: fallback when encountering ellipsis revisions · 7787174f
      Raphaël Gomès authored
      Ellipsis revisions are still experimental and buggy in non-trivial
      histories. We currently have no plans to improve this situation nor
      to add support for ellipsis revisions in `rhg`.
      
      Falling back should be done carefully (since we may have already done
      some work that is visible to the user), but in this case it's highly
      unlikely that we're doing anything useful with a repo with ellipsis
      revisions, so this should be strictly better, also since the
      error message is more explicit.
      7787174f
  6. Nov 02, 2022
  7. Nov 03, 2022
  8. Oct 19, 2022
  9. Sep 22, 2022
  10. Nov 04, 2022
    • Pierre-Yves David's avatar
      upgrade: no longer keep all revlogs in memory at any point · 19948429
      Pierre-Yves David authored
      Keeping all object open is unsustainable, so we will open them on demand. This
      mean opening them multiple times, but this is a lesser evil.
      
      Each revlog consume a small amount of memory (index content, associated nodemap,
      etc). While there are few "big" revlog, the sheer amount of small filelog can
      become a significant issue memory wise, consuming multiple GB of memory.  If you
      combines this extra usage with the use of multiprocessing, this usage can
      quickly get out of control. This can effectively block the upgrade of larger
      repository. This changeset fixes this issue.
      19948429
  11. Nov 02, 2022
    • Matt Harbison's avatar
      demandimport: convert ignored modules from bytes -> str in extensions · 5f22c92d
      Matt Harbison authored
      The default list of ignored modules are str, and test for bypassing the lazy
      import is `module.__name__ in ignores`, so these were effectively NOT ignored.
      Most of these date back to the grand byteification in 687b865b95ad, with some
      subsequent additions that followed the existing example.
      
      I have no idea if these modules in fact need to bypass lazy importing, but at
      least it follows the intent of the code.
      5f22c92d
  12. Oct 26, 2022
  13. Nov 04, 2022
    • Raphaël Gomès's avatar
      dirstate-v2: update constant that wasn't kept in sync · 5743e19b
      Raphaël Gomès authored
      Despite the best efforts of the comment, this constant wasn't kept in sync
      when the flags were being rewritten.
      
      The fact that this doesn't actually break anything in the Rust implementation
      too much (which does use directories) relies on the fact that all nodes
      can have children and that dirstate traversal is not based on that flag, but
      for metadata in optimizations. However the bug could become more serious should
      we start encoding stronger guarantees using a combination of flags including
      this one.
      5743e19b
  14. Oct 18, 2022
    • Matt Harbison's avatar
      lfs: avoid closing connections when the worker doesn't fork · 3556f039
      Matt Harbison authored
      Probably not much more than an minor optimization, but could be useful in the
      case of `hg verify` where missing blobs are fetched one at a time.
      3556f039
    • Matt Harbison's avatar
      lfs: fix blob corruption when tranferring with workers on posix · abf47186
      Matt Harbison authored
      The problem seems to be that the connection used to request the location of the
      blobs is sitting in the connection pool, and then when workers are forked, they
      all see and attempt to use the same connection.  This garbles everything.  I
      have no clue how this ever worked reliably (but it seems to, even on Linux, with
      SCM Manager 1.58).  See previous discussion when worker support was added[1].
      
      It shouldn't be a problem on Windows, since the workers are just threads in the
      same process, and can see which connections are marked available and which are
      in use.  (The fact that `mercurial.keepalive.ConnectionManager.set_ready()`
      doesn't acquire a lock does give me some pause though.)
      
      [1] https://phab.mercurial-scm.org/D1568#31621
      abf47186
    • Matt Harbison's avatar
      keepalive: add `__repr__()` to the HTTPConnection class to ease debugging · 76fbb1b6
      Matt Harbison authored
      By default, this just printed the class name and memory address.  By displaying
      the address and ports on both sides of the socket, it makes it easier to figure
      out what's in the ConnectionManager, and correlate with WireShark traces.
      
      It looks like the two connections mentioned in the previous commit come about
      because the LFS POST request to access the blobs opens connection 1, and gets a
      401.  Then for some reason, the follow up with credentials opens a new socket,
      instead of using the existing one in the pool.  I have no clue why.
      
      This can be seen with something like this in the blobstore:
      
      ```
          for h in self.urlopener.handlers:
              if hasattr(h, "close_all"):
                  print('open connections on %s in pid %d' % (type(h), os.getpid()))
                  for host, conns in h._cm.get_all().items():
                      for c in conns:
                          print('connection: %r' % c)
      ```
      76fbb1b6
    • Matt Harbison's avatar
      keepalive: ensure `close_all()` actually closes all cached connections · 8251f7cc
      Matt Harbison authored
      While debugging why LFS blob downloads are getting corrupted with workers, I
      noticed that prior to spinning up the workers, the ConnectionManager has 2
      connections to the server and calling `KeepAliveHandler.close_all()` left one
      behind.  The reason is the value component of `self._cm.get_all().items()` is a
      list, and `self._cm.remove()` modifies said list while the caller is iterating
      over it.  Now `get_all()` is a deep copy of both the dict and lists in all
      cases.
      8251f7cc
  15. Nov 02, 2022
  16. Oct 31, 2022
  17. Oct 24, 2022
  18. Oct 20, 2022
  19. Oct 19, 2022
  20. Oct 18, 2022
  21. Oct 10, 2022
    • Arseniy Alekseyev's avatar
      dirstate-v2: skip evaluation of hgignore regex on cached directories · eb02decd
      Arseniy Alekseyev authored
      By making the computation of [has_ignored_ancestor] lazy we're eliding
      its computation in the common case when none of its descendants have
      changed on disk.
      
      On a ~400k files repo, with a cached status, we saw a ~64% reduction
      in CPU time, resulting in a speedup of ~10-15% (on ZFS), and a speedup
      of ~38% of XFS (XFS has faster stat operations for some reason).
      eb02decd
  22. Sep 30, 2022
    • Craig Ozancin's avatar
      releasenotes: use re.MULTILINE mode when checking admonitions · 943509a5
      Craig Ozancin authored
      Release note admonitions must start at the beginning of a line within
      the changeset description:
      
      .. admonitions::
      
      The checkadmonitions function search for and validates admonitions.
      
      Unfortunately, since the ctx.description is multi-line, the regex search
      always fails unless the admonition is on the first line.
      
      This changeset adds re.MULTILINE to the re.compile to make the re opbject
      multi-line.
      943509a5
  23. Oct 10, 2022
  24. Oct 05, 2022
    • Arseniy Alekseyev's avatar
      rhg: parallellize computation of [unsure_is_modified] · 52464a20
      Arseniy Alekseyev authored
      [unsure_is_modified] is called for every file for which we can't
      determine its status based on its size and mtime alone.
      
      In particular, this happens if the mtime of the file changes
      without its contents changing.
      
      Parallellizing this improves performance significantly when
      we have many of these files.
      
      Here's an example run (on a repo with ~400k files after dropping FS caches)
      
      ```
      before:
      real	0m53.901s
      user	0m27.806s
      sys	0m31.325s
      
      after:
      real	0m32.017s
      user	0m34.277s
      sys	1m26.250s
      ```
      
      Another example run (a different FS):
      
      ```
      before:
      real	3m28.479s
      user	0m31.800s
      sys	0m25.324s
      
      after:
      real	0m29.751s
      user	0m41.814s
      sys	1m15.387s
      ```
      52464a20
Loading