Skip to content

perf: structural cold-build wins to reach 50% faster than PlatformIO #1468

Closed

Description

@zackees

Part of the cold-build perf meta issue.

Removing zccache's miss overhead should get us to roughly parity with PlatformIO. Reaching ≤ 50% of PlatformIO's cold time (≤ ~370 ms against PIO's ~745 ms on ubuntu-24.04) needs structural work, because the raw avr-gcc floor for the 26 TUs is already ~340 ms on a 4-core desktop and is likely higher on CI.

Candidates to evaluate once #1465 data exists (fill in the numbers):

  • Critical-path scheduling: start the sketch TU at the same time as the core TUs instead of after them, and start the largest TUs first.
  • Overlap archive/link with the compile tail, and skip ar for the core by linking the objects directly.
  • Overhead audit: measure fork/exec, env and pipe setup, and the spawn path through running-process. Reuse compiler environment/argv construction.
  • Precompiled headers for Arduino.h across core TUs, if the output is bit-identical.
  • Content-addressed prebuilt framework core shipped with the package archive. This needs a fairness ruling first: the benchmark's cold definition retains "installed packages/toolchains and fbuild package archives", and PlatformIO keeps its packages too, so decide explicitly whether prebuilt objects count and document it in the benchmark's cold definition.

Rule: no change to the benchmark's cold definition that isn't applied equally to every tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions