Context
The nightly Arduino CLI vs PlatformIO vs fbuild benchmark currently reports an implausible fbuild cold median. Its first production run measured:
- fbuild cold: 79.787 ms
- fbuild warm: 51.224 ms
Before each fbuild cold trial, the runner calls:
fbuild clean all bench/blink --environment uno --release
clean all intentionally removes the selected project outputs and matching reusable framework artifacts, but it does not clear the embedded zccache object store at fbuild_paths::get_fbuild_root().join(zccache). The “cold” build therefore receives compiler-cache hits.
Arduino CLI currently removes only its build directory. PlatformIO runs its project clean target. Neither tool’s download/HTTP cache cleaner is invoked.
Proposal
Public fbuild operation
Add:
fbuild clean cache [PROJECT_DIR] [-e ENV] [--quick|--release]
The operation must:
- Refuse safely if another daemon operation is active.
- Gracefully stop the daemon so the embedded zccache store has no live owners.
- Idempotently remove only the mode-correct compiler cache root returned through
fbuild_paths; never hard-code dev, prod, or a home-directory path.
- Restart the daemon even when cleanup encounters an error, returning the relevant failure afterward.
- Perform the existing
clean all behavior for the selected project/environment/profile.
- Retain installed packages, platforms, frameworks, and toolchains.
Because the compiler cache is global to the active fbuild mode/trust domain, the command and documentation must explicitly describe that scope.
Symmetric benchmark preparation
Before every cold trial, outside the timed interval:
- Arduino CLI:
- run
arduino-cli cache clean;
- remove the configured build directory.
- PlatformIO:
- run
pio system prune --cache --force;
- run
pio run --target clean for the Uno environment.
- fbuild:
- run
fbuild clean cache ....
The warm measurement must immediately repeat the build without another cleanup.
Installed toolchains/framework packages remain primed so the benchmark measures compilation rather than installation or network latency.
Published metadata
Update the site and JSON cold definition to state that project outputs, reusable framework objects, compiler-object caches, and download/HTTP caches are cleared while installed packages/toolchains remain.
Acceptance criteria
Open questions
None. The cold-cache contract was confirmed by the requester.
Related issues
Context
The nightly Arduino CLI vs PlatformIO vs fbuild benchmark currently reports an implausible fbuild cold median. Its first production run measured:
Before each fbuild cold trial, the runner calls:
clean allintentionally removes the selected project outputs and matching reusable framework artifacts, but it does not clear the embedded zccache object store atfbuild_paths::get_fbuild_root().join(zccache). The “cold” build therefore receives compiler-cache hits.Arduino CLI currently removes only its build directory. PlatformIO runs its project clean target. Neither tool’s download/HTTP cache cleaner is invoked.
Proposal
Public fbuild operation
Add:
The operation must:
fbuild_paths; never hard-codedev,prod, or a home-directory path.clean allbehavior for the selected project/environment/profile.Because the compiler cache is global to the active fbuild mode/trust domain, the command and documentation must explicitly describe that scope.
Symmetric benchmark preparation
Before every cold trial, outside the timed interval:
arduino-cli cache clean;pio system prune --cache --force;pio run --target cleanfor the Uno environment.fbuild clean cache ....The warm measurement must immediately repeat the build without another cleanup.
Installed toolchains/framework packages remain primed so the benchmark measures compilation rather than installation or network latency.
Published metadata
Update the site and JSON cold definition to state that project outputs, reusable framework objects, compiler-object caches, and download/HTTP caches are cleared while installed packages/toolchains remain.
Acceptance criteria
fbuild clean cache [PROJECT_DIR] [-e ENV] [--quick|--release]parses and is documented.Open questions
None. The cold-cache contract was confirmed by the requester.
Related issues
clean sketch|alland intentionally scopedallto selected project/framework artifacts rather than the global compiler-object cache.