Problem
In the FastLED repo, fbuild's warm-pass (incremental, nothing changed) compilation takes ~30 s per sketch. The build pipeline is designed around a re-hydratable cache; in the best case the no-op rebuild should be sub-second. Somewhere between "nothing to do" and "done" there is ~30 s of wall-clock time that is not explained by actual compilation.
Acceptance criteria
- Identify the dominant stall(s) with concrete numbers (e.g., "7 s in X", "12 s in Y").
- Produce a prioritized fix list with expected savings per item.
- Drive warm-pass wall-clock down to <3 s for a representative FastLED example and document the new baseline.
Investigation checklist
1. Reproduce & baseline
2. Macro profiling
3. Fingerprint / staleness checks
4. Toolchain / package resolution
5. Daemon / IPC overhead
6. Process spawn cost
7. Build graph execution
8. ESP-IDF / framework-specific
9. Disk cache
10. Cross-reference FastLED CI badges
Deliverables
Context
Problem
In the FastLED repo, fbuild's warm-pass (incremental, nothing changed) compilation takes ~30 s per sketch. The build pipeline is designed around a re-hydratable cache; in the best case the no-op rebuild should be sub-second. Somewhere between "nothing to do" and "done" there is ~30 s of wall-clock time that is not explained by actual compilation.
Acceptance criteria
Investigation checklist
1. Reproduce & baseline
examples/Blink,examples/DemoReel100).2. Macro profiling
BuildOrchestratorphase boundaries withInstant::now()checkpoints; log per-phase elapsed on warm run.3. Fingerprint / staleness checks
build_fingerprinthashing cost — does it mtime-scan every source & header?.d) are being re-read serially for each compile unit even when no source changed.compile_database::write_and_copy_identical_contentactually short-circuits identical-content writes (tests exist — prove runtime behavior matches).4. Toolchain / package resolution
ensure_toolchain()andensure_framework()short-circuit fully on hot cache, or re-touch manifest / re-hash archives.library_manager— does it re-scan every lib dir on each build?5. Daemon / IPC overhead
buildop.6. Process spawn cost
strace/Procmon). Each compiler probe, eachfileinvocation, eachsize/objcopycall adds up.gcc --version,ar --version, etc.) are cached across builds.7. Build graph execution
cargo check-style early rejection before spawning parallel workers?8. ESP-IDF / framework-specific
libxxx.afiles) — cached or re-globbed?stateach directory on every build?9. Disk cache
disk_cache::leaseacquisition time on warm build.disk_cache::gc::reconcile_on_open— does it run on every build or only at daemon start?10. Cross-reference FastLED CI badges
Deliverables
docs/PERF_WARM_BUILD.md(or issue comment) summarizing the findings with concrete timing tables.tests/or acrates/fbuild-build/benches/entry so regressions are caught early.Context