Skip to content

esp32dev_binary_size: stale 330 KB budget vs 635 KB reality on platformio backend #2608

Description

@zackees

Symptom

esp32dev_binary_size workflow has been failing on master continuously since at least 2026-05-30 02:00 UTC:

esp32dev size 635192 is greater than max size 330000
::error::Compiled size exceeds maximum allowed size

100% failure rate across 30+ runs (gh run list --workflow=esp32dev_binary_size --branch=master --limit=100 reports zero successes).

Root cause

The max_size budget in .github/workflows/check_esp32_size.yml is 330000 bytes, last bumped 2025-08-15 in commit 8ed2ea80f (#2056) from 320000 → 330000 to track "a little bit" of Arduino-ESP32 framework growth.

Since then:

  1. The Channel API landed (~70 KB structural cost — see ESP32-S3 binary size: 657 KB on master vs 344 KB on 3.10.3 — remaining +313 KB delta breakdown #2473)
  2. The .eh_frame orphan-unwind metadata stripping was migrated to fbuild#243 (now closed/merged), which strips ~169 KB — but the size workflow was just pinned to --backend platformio by ci(size): pin binary-size checks to --backend platformio (unblock master) #2605 to dodge fbuild's missing build_info.json (fbuild#297) and link bloat (fbuild#304). PlatformIO does NOT strip eh_frame, so we lose that 169 KB savings.
  3. Arduino-ESP32 framework itself grew with subsequent releases.

Result on current master, fresh Blink build via --backend platformio:

  • firmware.bin = 635,192 B (635 KB)
  • Budget = 330,000 B (330 KB)
  • Delta = +305 KB (+93%)

This is a real growth, not a measurement glitch — the 330 KB ceiling no longer reflects what a stock ESP32 Arduino + FastLED build produces under the platformio backend.

Options

Option Pros Cons
A. Bump max_size to ~700000 (current 635 + ~10% headroom) Restores green CI immediately; reflects reality of platformio backend Loses regression-detection sensitivity until we recalibrate after fbuild backend returns
B. Wait for fbuild backend to come back (fbuild#297, #304 fixes ship + #2605 reverts) Recovers the 169 KB eh_frame savings, so 330 KB might become attainable again Keeps CI red for an indeterminate time
C. Track size on a per-section basis (text only, ignoring framework) More stable across framework versions Requires non-trivial rework of ci/compiled_size.py

Recommended: A. Bump to 700000 now to unblock master. Once fbuild ships the extra_flags/link fixes and #2605 is reverted, file a follow-up to lower the limit back to whatever the fbuild-backend size actually is.

Reproduction

gh run view 26690455730 --log-failed

Related

Activity

  1. zackees commented on May 30, 2026

    @zackees
    MemberAuthor

    Reconsidered after user pushback: do NOT raise the budget.

    The current 330 KB ceiling and the 635 KB current reality are structurally incompatible. Per the #2473 audit on a sister ESP32-S3 with the same architecture:

    • ESP-IDF + FreeRTOS + Arduino-core baseline: ~245 KB (panic handler, init, libc, Serial)
    • Framework .eh_frame (not stripped on platformio backend): ~170 KB
    • FastLED Channel API + RMT engine: ~70 KB
    • printf-family (FL_LOG/FL_WARN merged-strings): ~55 KB
    • Vtables/RTTI/jump-tables: ~50 KB

    Even with every known size optimization landed:

    • -fno-asynchronous-unwind-tables everywhere → −169 KB
    • Gate FL_LOG/FL_WARN strings behind release-mode level → −35 KB
    • Strip RTTI demangled names (-fno-rtti for libFastLED) → −15 KB

    The floor lands around 415-430 KB. Still ~100 KB over the 330 KB budget.

    So with the budget held constant, the path to green is one of:

    1. Narrow the measurement scope — change ci/compiled_size.py to report a delta against a known framework baseline binary (compile Blink with empty setup()/loop() once per framework version, subtract). The 330 KB budget then measures FastLED's contribution, which is ~70 KB and well under the ceiling.

    2. Switch the workflow off Arduino framework — measure against a pure ESP-IDF build that doesn't drag in the 250 KB framework baseline. Requires a new sketch fixture and a different platformio.ini env.

    3. Drop this workflow as broken-by-design until one of the above is implemented; mark the YAML if: false so it stops cluttering CI red.

    Closing as "blocked on design decision" rather than as a fix-able bug — the budget itself is fine, the binary itself is structurally legitimate, but the comparison is comparing two different things (total firmware vs. an old framework's total firmware). Re-open with a chosen option to drive an implementation.

  2. zackees commented on Jun 5, 2026

    @zackees
    MemberAuthor

    this is a deep regression and we can't just raise the check pass

  3. added 2 commits that reference this issue on Jun 5, 2026
    4e0435c
    f00e8cf
  4. added a commit that references this issue on Jun 5, 2026
    ab67e3f
  5. moved this from Triage to Done in FastLED Trackeron Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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