Reduce the build and test times of the aggregator

Aperta
#3,741 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Rust
Stelle
155
Fork
52
Merge medio
3g 9h
PR unite (30g)
33

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di IntersectMBO/mithril

Tutte le issue di IntersectMBO/mithril

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.