Skip to content

perf(build): no-change rebuild recompiles the entire sketch + core variant (~103s; should be seconds) #951

Description

@zackees

Context

#942 Phase-1 baseline (NightDriverStrip env:demo, 4 vCPU Linux container, median of 3): a no-change rebuild takes 107.8 s. Per-phase data shows compile-sketch=92.0s and compile-core-variant=10.7s re-run on every build even when zero files changed; only fw-libs short-circuits (0.001 s). fast-path-check=0 ms in every run — the fast path never engages for the sketch/core paths. The embedded zccache service also doesn't convert these recompiles into cache hits (hot compile-sketch ≈ warm compile-sketch).

For comparison, fw-libs demonstrates the desired behavior — its fingerprint check drops 150 s to 1 ms on hot rebuilds.

Proposal

Make the no-change rebuild converge to a fingerprint check + link-skip:

  • Extend the fast-path/fingerprint coverage to sketch sources and the core variant (same mechanism fw-libs uses).
  • Investigate why per-TU zccache lookups miss on identical recompiles (env/cwd/argv nondeterminism in the key?) — hits there would also accelerate the warm scenario.
  • Skip link + elf2image when all inputs are unchanged and artifacts exist.

Acceptance criteria

Part of #942 (baseline: #942 (comment) — Phase 1 comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions