Reduce the build and test times of the aggregator

未关闭
#3,741 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust

调研方向

Start by measuring the aggregator with cargo build --timings, cargo test --no-run, and cargo nextest, then compare the results against the signer and the ci-tests profile. Read the mithril-aggregator and workspace Cargo manifests to trace the listed feature and profile settings. Done means recording the baseline, applying justified optimizations, and measuring gains against it.

由索引模型根据 Issue 内容生成。

描述

optimization :hammer_and_wrench:

Why

The mithril-aggregator crate is still the slowest unit of the workspace to build and test (unit test binary about 77 s, 13 integration test binaries of 12 to 17 s each, against 16 s and 6 to 9 s for the signer), which slows down the local development loop and the CI.

What

The aggregator build and test times are measured, then reduced by removing the feature flips and the per binary fixed costs that remain after the boxing of the HTTP route filters.

How

  • Measure the current build times (cargo build --timings, cargo test --no-run) and the slowest tests (cargo nextest) of the aggregator to set a baseline
  • Assess possible optimizations:
    • Remove the allow_skip_signer_certification feature flip of the mithril-common dev-dependency, which rebuilds mithril-common and the 13 internal crates depending on it between cargo build and cargo test?
    • Align the features of the shared dependencies (tokio, reqwest, rustls, tower, zstd) at the workspace level to stop the rebuilds when switching between the aggregator and the other packages?
    • Evaluate a reduced debug info level (debug = "line-tables-only") for the local dev profile, as already used by the ci-tests profile?
    • Speed up or move to the slow tier the slowest aggregator tests found by the baseline?
    • TBD
  • Measure the gains against the baseline
主要语言
Rust
星标
155
派生
52
平均合并
3 天 9 小时
30 天内合并 PR
33

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

IntersectMBO/mithril 的其他 Issue

查看 IntersectMBO/mithril 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。