Repository navigation
Closed
Description
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:
- Hardcoded low test parallelism:
scripts/run-rust-test.mjs:54hardcodes 3 concurrent test processes and.github/workflows/ci.yml:200hardcodes--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. - Hot third-party dependencies run unoptimized (
opt-level = 0) indevtests:Cargo.tomlsets 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_flowhas zero sleeps and zero child processes yet takes ~60s on both macOS and Linux. - Uncached from-scratch compilation in
windows-cli: Windows runners have nombxcache andactions/checkoutwipestarget/viagit clean -ffdx. In run44684351971(job136115097512),windows-clispent 3m 30s compiling 431 crates from scratch to run 7.74s ofdim-cli --libtests (96% pure recompile overhead). - Long-tail Step 9 tests: In
Verify actual CLI profiles and line-mode flows(171s on macOS, run44676046075), 10 of 12 tests finish in 1–5s each while just two tests —hooks::project_hooks_start_disabled_and_the_user_enables_them(~102s) andexport_writes_the_timeline_without_starting_a_daemon(~86s) — account for most of the step due to repeated real CLI/daemon startups. - Minor workflow efficiency cleanups:
release.ymlcompilescargo-aboutfrom source on everypreflightrun (cargo install cargo-about --version 0.9.3); using a pinned prebuilt release archive saves several minutes per release.code-layout.ymlduplicates ~50 lines of Windows Rust/MSVC/lld-link setup betweenplatform-artifactandnative-layout(extract into a composite action).
Refs #1919.
References or acceptance criteria
- Make test concurrency in
scripts/run-rust-test.mjs/ci.ymlscale with runner CPU capacity (or evaluatecargo-nextestfor per-test scheduling across binaries). - Benchmark and enable
opt-level = 2for targeted third-party crates under[profile.dev.package.*]inCargo.toml, measuring the impact onmodel_catalog_flow,modality_flow, and cold build time. - Add compiler caching or safe persistent
CARGO_TARGET_DIRreuse forwindows-cli(and shared remote cache across Linux/Windows runners where feasible) to cutwindows-clicompile time under 1 min. - Profile and speed up
hooks::project_hooks_start_disabled_and_the_user_enables_themandexport_writes_the_timeline_without_starting_a_daemon. - Switch
release.ymlcargo-aboutinstallation to a pinned prebuilt binary and deduplicate Windows setup incode-layout.yml.
Metadata
Metadata
Assignees
Labels
No labels
Activity
ci(perf): unlock test parallelism, optimize hot dev crates, cache win…