Skip to content

Mitts 0.3.4

Choose a tag to compare

@alex09x alex09x released this 25 Oct 02:18
· 392 commits to main since this release

Mitts 0.3.4 is a performance release for warm cache hits, aimed at the gap between macOS/APFS and Linux that the T5 worktree-swarm study exposed: on a warm cache Mitts compiles nothing, so its time is filesystem and process work, which costs several times more per operation on APFS than on XFS or ext4.

Cache hits (42da312, 77017dc, e0997b1)

  • Named artifact hits are read-only. A hit no longer repairs the link between a cache object and its named alias; snapshot links are preserved instead of being recreated by every reader. On a cache restored by copying, twelve concurrent readers used to spend most of their time on link/rename/unlink repair.
  • Checkout path aliases are normalized. Canonical and lexical checkout/output paths are remapped so a local proc macro is reused across macOS path aliases (/tmp vs /private/tmp) without retaining checkout paths. The remap protocol is versioned in unit keys and fast-lock options; all input freshness and leak checks are kept.
  • Less per-invocation work on macOS. Runtime-detected ARM SHA-256 acceleration; per-invocation cache and planning work is bounded; package-tree hashes that no unit consumes are skipped; real compilation and publication stay outside the cache-reader queue.
  • Jobserver work is deferred until something compiles. The managed pool initializes lazily and execution tokens are acquired only after cache and single-flight checks; a build-script miss keeps its reservation for the consuming unit; managed unit reservation happens after the single-flight lock and the second restore. Build-script last-use updates are throttled while GC refresh is preserved.

Jobserver (7970284, ae9206a)

  • Live slot descriptors are reused during contention instead of repeated directory creation and open/close cycles; a local atomic lease precedes the kernel lock so one shared descriptor is never granted twice. The blocking single-slot path and retry of failed opens are unchanged. FIFO token counting is portable on macOS.

Diagnostics (42ff7c6)

  • MITTS_TIMINGS=1 measures input validation boundaries separately.

Measured so far (paired warm-hit diagnostics, not a full study): anyhow 12-worktree hit on Apple Silicon/APFS 1.53 s → 0.50 s, itoa 1.51 s → 0.31 s, aggregate system CPU 29 s → 4–5 s; on x86_64 Linux/XFS itoa 0.062 s → 0.043 s. The full T0–T5 series on both platforms is being rerun on this release.

Install or update:

cargo install mitts --version 0.3.4 --locked

Full history: v0.3.3...v0.3.4