Skip to content
Snippets Groups Projects
  1. Nov 14, 2022
  2. Nov 10, 2022
  3. Oct 19, 2022
    • Raphaël Gomès's avatar
      rust-status: query fs traversal metadata lazily · da48f170
      Raphaël Gomès authored
      Currently, any time the status algorithm needs to read a directory from the
      filesystem (because the stat-only optimization is not available), it also
      stats each directory entry eagerly.
      
      Stat'ing the entries is only needed in a few cases (like when checking
      the mtime of a directory for caching): this patch creates a wrapper struct
      `DirEntry` that only stats the directory entry it represents when needed.
      
      Excerpt of an `strace` before this change on Mozilla Central:
      
      ```
      openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
      newfstatat(3, "", {st_mode=S_IFDIR|0755, st_size=3540, ...}, AT_EMPTY_PATH) = 0
      getdents64(3, 0x55dc970bd440 /* 139 entries */, 32768) = 5072
      statx(3, ".hg", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0755, stx_size=772, ...}) = 0
      
      [... 135 other successful `statx` calls]
      
      getdents64(3, 0x55dc970bd440 /* 0 entries */, 32768) = 0
      close(3)                                = 0
      ```
      
      After this change:
      
      ```
      openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
      newfstatat(3, "", {st_mode=S_IFDIR|0755, st_size=3540, ...}, AT_EMPTY_PATH) = 0
      getdents64(3, 0x561567c10190 /* 139 entries */, 32768) = 5072
      getdents64(3, 0x561567c10190 /* 0 entries */, 32768) = 0
      close(3)                                = 0
      ```
      da48f170
    • Raphaël Gomès's avatar
      6b32d39e
  4. 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
  5. Nov 02, 2022
  6. Oct 19, 2022
  7. 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
  8. 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
  9. Sep 20, 2022
  10. Sep 22, 2022
  11. Sep 20, 2022
  12. Sep 22, 2022
    • Arseniy Alekseyev's avatar
      rhg: fix bugs around [use-dirstate-tracked-hint] and repo auto-upgrade · 3a538710
      Arseniy Alekseyev authored
      This makes two changes:
      - make rhg support the [dirstate-tracked-key-v1] requirement.
      I believe rhg never changes the tracked file set, so it's OK that it
      doesn't have any logic for writing this file.
      
      - fix the name of [format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories]
      config option in rhg, which makes rhg actually honor the auto-upgrade.
      
      These two issues cancelled each other out in tests (auto-upgrade was happening
      because [dirstate-tracked-key-v1] forced the fallback, not because of the config),
      which is I think why they went unnoticed earlier.
      3a538710
  13. Jul 25, 2022
  14. Jul 19, 2022
  15. Jul 11, 2022
    • Raphaël Gomès's avatar
      rust: add Debug constraint to Matcher trait · e8481625
      Raphaël Gomès authored
      This makes sure we can easily debug which Matcher we're looking at when using
      trait objects, and is just generally useful. Effort to make the debugging
      output nicer has been kept to a minimum, please feel free to improve.
      e8481625
  16. Jul 19, 2022
  17. Jul 18, 2022
  18. Jul 06, 2022
  19. Aug 29, 2022
  20. Aug 24, 2022
  21. Aug 17, 2022
  22. Jul 11, 2022
    • kiilerix's avatar
      rust: bump to memmap2 0.5.3, micro-timer 0.4.0, and crossbeam-channel 0.5.0 · 1bad05cf
      kiilerix authored
      The merge in 12adf8c695ed had conflicts in rust/Cargo.lock and
      rust/hg-core/Cargo.toml . Let's ignore rust/Cargo.lock - it is regenerated.
      
      For rust/hg-core/Cargo.toml, stable had dd6b67d5c256 "rust: fix unsound
      `OwningDirstateMap`" which introduced ouroboros (and dropped
      stable_deref_trait).
      
      Default had ec8d9b5a5e7c "rust-hg-core: upgrade dependencies" which had a lot
      of churn bumping minimum versions - also patch versions. It is indeed a good
      idea to bump to *allow* use of latest package. That means that major versions
      should be bumped for packages after 1.0, and for packages below 1.0 minor
      versions should be bumped too. But it doesn't work to try enforce a policy of
      using latest patch by bumping versions at arbitrary times.
      
      For good or bad, the merge doesn't seem to have resolved the conflicts
      correctly, and many of the minor "upgrade dependencies" were lost again.
      
      Unfortunately, it also lost the bump of memmap2 to 0.5.3, which is needed for
      Fedora packaging where 0.4 isn't available. Same with micro-timer bump to 0.4
      (which already is used in rhg). crossbeam-channel bump was also lost.
      
      This change fixes that regression by redoing these "important" lines of the
      merge "correctly".
      
      I propose this for stable, even though dependency changes on stable branches
      are annoying.
      1bad05cf
  23. May 25, 2022
    • Raphaël Gomès's avatar
      rust: remove excessive calls to `#[timed]` · 6b04f702
      Raphaël Gomès authored
      This makes trace output *really* noisy and is only useful in case you want to
      take a look at a single revlog.
      
      This is easy to add back on a case-by-case basis and does not need to stay with
      the more permanent timers.
      6b04f702
  24. May 18, 2022
  25. Jun 16, 2022
  26. Jun 08, 2022
  27. May 24, 2022
  28. May 25, 2022
  29. May 22, 2022
  30. Apr 05, 2022
  31. Apr 15, 2022
Loading