Skip to content

ci/perf: unlock test parallelism, optimize hot dev third-party crates, cache windows-cli, and trim slow tail tests #1935

Closed

Description

@eric8810

What needs tracking?

Even after moving primary PR verification to Linux (#1919) and reducing redundant triggers, several build/test throughput bottlenecks leave substantial wall-clock time on the table:

  1. Hardcoded low test parallelism: scripts/run-rust-test.mjs:54 hardcodes 3 concurrent test processes and .github/workflows/ci.yml:200 hardcodes --test-threads=3 (9 threads max). On the 32-vCPU / 93 GiB Linux runner (node-1-runner, PR ci: require full Linux verification and macOS-native checks on pull requests #1921), >70% of CPU remains idle during tests, and long single binaries (cli_flow, transport_flow) stall the tail.
  2. Hot third-party dependencies run unoptimized (opt-level = 0) in dev tests: Cargo.toml sets no [profile.dev.package.*] overrides. CPU/decompression-heavy read-only crates (flate2, miniz_oxide, regex, regex-automata, image, sha2, serde_json) run unoptimized — for example, model_catalog_flow has zero sleeps and zero child processes yet takes ~60s on both macOS and Linux.
  3. Uncached from-scratch compilation in windows-cli: Windows runners have no mbx cache and actions/checkout wipes target/ via git clean -ffdx. In run 44684351971 (job 136115097512), windows-cli spent 3m 30s compiling 431 crates from scratch to run 7.74s of dim-cli --lib tests (96% pure recompile overhead).
  4. Long-tail Step 9 tests: In Verify actual CLI profiles and line-mode flows (171s on macOS, run 44676046075), 10 of 12 tests finish in 1–5s each while just two tests — hooks::project_hooks_start_disabled_and_the_user_enables_them (~102s) and export_writes_the_timeline_without_starting_a_daemon (~86s) — account for most of the step due to repeated real CLI/daemon startups.
  5. Minor workflow efficiency cleanups:
    • release.yml compiles cargo-about from source on every preflight run (cargo install cargo-about --version 0.9.3); using a pinned prebuilt release archive saves several minutes per release.
    • code-layout.yml duplicates ~50 lines of Windows Rust/MSVC/lld-link setup between platform-artifact and native-layout (extract into a composite action).

Refs #1919.

References or acceptance criteria

  • Make test concurrency in scripts/run-rust-test.mjs / ci.yml scale with runner CPU capacity (or evaluate cargo-nextest for per-test scheduling across binaries).
  • Benchmark and enable opt-level = 2 for targeted third-party crates under [profile.dev.package.*] in Cargo.toml, measuring the impact on model_catalog_flow, modality_flow, and cold build time.
  • Add compiler caching or safe persistent CARGO_TARGET_DIR reuse for windows-cli (and shared remote cache across Linux/Windows runners where feasible) to cut windows-cli compile time under 1 min.
  • Profile and speed up hooks::project_hooks_start_disabled_and_the_user_enables_them and export_writes_the_timeline_without_starting_a_daemon.
  • Switch release.yml cargo-about installation to a pinned prebuilt binary and deduplicate Windows setup in code-layout.yml.

Activity

  1. self-assigned this
    on Nov 20, 2026
  2. added a commit that references this issue on Nov 20, 2026
    7420e87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions