Read about our upcoming Code of Conduct on this issue

  1. 14 Oct, 2021 6 commits
  2. 05 Oct, 2021 1 commit
    • Arseniy Alekseyev's avatar
      rhg: stop manifest traversal when no more files are needed · 0cc69017d47f
      Arseniy Alekseyev authored
      Stopping the traversal early can skip a significant part
      of the manifest traversal, to avoid some of its cost.
      The worst-case benchmarks are favorable, as well.
      Running [hg cat] on the last file in the manifest of
      a large repo, I'm seeing a ~4ms improvement (150ms -> 146ms),
      so this time is now almost indistinguishable from the
      baseline ("brute force") implementation.
      Running [hg cat] on ~220 files together with the last file
      of the repo is further improved by ~5ms or so.
      I suspect the raw performance improvements are caused by splitting
      the manifest search and the file data access into separate phases,
      instead of interleaving them.
      Differential Revision:
  3. 04 Oct, 2021 1 commit
  4. 16 Jul, 2021 1 commit
    • Simon Sapin's avatar
      dirstate-v2: Add support when Rust is not enabled · b4f83c9e7905
      Simon Sapin authored
      This wires into `dirstatemap` the parser and serializer added in previous
      changesets. The memory representation is still the same, with a flat `dict`
      for `DirstateItem`s and another one for copy sources. Serialization always
      creates a new dirstate-v2 data file and does not support (when Rust is not
      enabled) appending to an existing one, since we don’t keep track of which
      tree nodes are new or modified. Instead the tree is reconstructed during
      Differential Revision:
  5. 22 Jul, 2021 1 commit
  6. 03 Oct, 2021 1 commit
  7. 08 Oct, 2021 1 commit
  8. 13 Oct, 2021 2 commits
    • Simon Sapin's avatar
      dirstate-v2: Add storage space for nanoseconds precision in file mtimes · 308d9c245337
      Simon Sapin authored
      For now the sub-second component is always set to zero for tracked files and
      symlinks. (The mtime of directories for the `readdir`-skipping optimization
      is a different code path and already uses the full precision available.)
      This extra storage uses the space previously freed by replacing the 32-bit
      `mode` field by two bits in the existing `flags` field, so the overall size
      of nodes is unchanged. (This space had been left as padding for this purpose.)
      Also move things around in the node layout and documentation to have less
      duplication. Now that they have the same representation, directory mtime and
      file mtime are kept in the same field. (Only either one can exist for a given
      Differential Revision:
    • Simon Sapin's avatar
      status: Extract TruncatedTimestamp from fs::Metadata without SystemTime · 15dedc0c5c35
      Simon Sapin authored
      On Unix, the Rust standard library exposes `mtime` and `mtime_nsec` methods
      for `std::fs::Metada` whih is exactly what we need to construct a
      `TruncatedTimestamp`. This skips the computation in the conversion through
      `SystemTime` and `Result<Duration, Duration>`.
      Differential Revision:
  9. 17 Sep, 2021 2 commits
  10. 12 Oct, 2021 16 commits
  11. 13 Oct, 2021 1 commit
  12. 12 Oct, 2021 2 commits
  13. 03 Oct, 2021 1 commit
  14. 12 Oct, 2021 1 commit
    • Simon Sapin's avatar
      dirstate-v2: Replace the 32-bit `mode` field with two bits · 4d5a13253d34
      Simon Sapin authored
      Previously we stored the entire value from `stat_result.st_mode`,
      like dirstate-v1 does. However only the executable permission
      and type of file (only symbolic links and normal files are supported)
      are relevant to Mecurial.
      So replace this field with two bits in the existing bitfield byte.
      For now the unused space is left as padding, as it will be used
      for something else soon.
      Differential Revision:
  15. 11 Oct, 2021 1 commit
  16. 12 Oct, 2021 2 commits