Repository navigation
Description
Goal
Close out Stage 4 (cold-helper audit) and Stage 5 (fl::basic_string::write simplification) from #2886 by updating the user-facing roadmap to document the audit findings against the current (post-Stage-1) tree. No source change. The audit was the deliverable; the only artifact is a roadmap update with file:line citations.
Parent: #2886 — Stages 4 + 5 of the multi-stage bloat-reduction plan.
Why these are "no-action — already addressed"
Stage 4 and Stage 5 were authored before Stage 1 (#2890) flipped the FASTLED_LOG_VERBOSITY default to 0 on release builds. The pre-Stage-1 byte attribution for each target was dominated by FL_WARN / FL_LOG_RMT string pools, which Stage 1 already collapses. Re-auditing each target against the post-Stage-1 tree shows the residual code bytes are essential (storage state machines, peripheral teardown, IDF API plumbing) — nothing further to squeeze without changing semantics.
Stage 4, target #1 — Channel::showPixels trait detection
Verdict: no action. The has_no_runtime_scaling_v<> template trait the #2886 description mentioned does not exist in the codebase. The actual dispatch in pixel_iterator.h:206-215 is a three-way runtime branch on mRgbww.active() / mRgbw.active() against compact 5-line encoders (encodeWS2812_RGB/_RGBW/_RGBWW in ws2812.h:35-96). The encoder bodies are too small for a build-flag-gated removal to be worth the user-facing complexity.
Stage 4, target #2 — ChannelEngineRMTImpl::reconfigureForNetwork
Verdict: no action. Body at channel_driver_rmt.cpp.hpp:1128-1236 is the channel destroy / recreate sequence around an Network state transition. Of 10 diagnostic emissions, 8 are FL_DBG (already gated by FASTLED_HAS_DBG) and 2 are FL_WARN (no-op'd by Stage 1 in release builds). The remaining bytes are the destroy / encoder-delete / channel-recreate / DMA-free loop — essential peripheral teardown that cannot be eliminated.
Stage 4, target #3 — ChannelManager::addDriver capStr builder
Verdict: already correct in master. The entire capStr builder block at manager.cpp.hpp:117-132 (Capabilities query + fl::string capStr allocation + branches + FL_DBG emission) is wrapped in #if FASTLED_HAS_DBG. No fix needed; the audit was a verification.
Stage 4, target #4 — RmtMemoryManager::handleAllocateTxFailure
Verdict: no action. At rmt_memory_manager.cpp.hpp:417-478, the function is already a FL_NO_INLINE cold helper (#2840). Post-Stage-1: the 5 FL_LOG_RMT and 10 FL_WARN sites are no-op'd by FASTLED_LOG_VERBOSITY=0, and the size_t computations at lines 451-454 that fed those FL_WARNs are DCE'd by the optimizer because they're only used inside the now-empty FL_WARN expansion. Residual: the tryAllocateWords fallback path + the mLedger.allocations.push_back call — essential fallback logic.
Stage 5 — fl::basic_string::write simplification
Verdict: no action. Body at basic_string.cpp.hpp:193-283 is the COW + inline-vs-heap storage state machine: four branches (non-owning, unique-heap, COW-heap, inline + inline→heap transition). Each branch contains memcpy + make_shared + '\0' terminator. There is no formatted-stream machinery in the body. The projected ~0.5-1 KB from #2886 likely overestimates — the body does what it has to do for FastLED's COW string semantics.
Deliverable
One file edit: docs/SLIM_ESP32S3.md — update the Roadmap section to mark Stage 4 and Stage 5 as audited / no action with the specific file:line citations above. No other change.
Why this matters even without a code change
The current roadmap section in docs/SLIM_ESP32S3.md lists Stages 4 + 5 as "in progress with projected savings ~3-5 KB / ~0.5-1 KB". A user reading the doc would expect those savings to land. The honest update is that the savings won't materialize — post-Stage-1, the relevant byte budgets are already squeezed. The roadmap should reflect that so users don't wait for phantom savings before deciding their current FastLED build is already at its smallest reasonable size.
Acceptance
docs/SLIM_ESP32S3.mdRoadmap section updates Stages 4 + 5 to "audited / no action" with the file:line citations from this issue.- Stage 6 (the CI gate) remains the only Stage that can still ratchet the baseline — and even then, only if a future structural refactor (Batch 4 / Meta: ESP32-S3 binary-size reduction — Batch 3 (successor to #2773) #2856 successor) lands real savings.
- The doc still cites Meta: ESP32-S3 Blink bloat reduction (file:line concrete plan) — supersedes #2885 #2886 as the parent meta with the original projections preserved for context (a footnote / sidebar).
Out of scope
- Closing Meta: ESP32-S3 Blink bloat reduction (file:line concrete plan) — supersedes #2885 #2886 — that's for the meta-issue owner to decide. This PR just makes the user-facing doc honest about what's left.
- Changing the regression-gate baseline at
tests/data/esp32s3_bloat_baseline.txt— that file should ratchet ONLY when an actual measured saving lands.
Related
- Meta: ESP32-S3 Blink bloat reduction (file:line concrete plan) — supersedes #2885 #2886 — parent meta tracking the multi-stage bloat reduction (Stages 4 + 5 of 6).
- perf(log): default FASTLED_LOG_VERBOSITY=0 in release builds (#2886 Stage 1) #2890 / perf(esp32): suppress Arduino-ESP32 boot banner via build-flag shim (#2886 Stage 2) #2894 / docs(esp32): ship tools/sdkconfig_for_smallest_fastled.defaults overlay (#2886 Stage 3) #2896 — Stages 1, 2, 3 (the savings that collapsed the Stage 4/5 byte attributions).
- docs(esp32): ship docs/SLIM_ESP32S3.md user-facing reference (#2886 Stage 0) #2898 — Stage 0 (user-facing doc).
- ci(esp32): bloat regression gate with ratcheting baseline (#2886 Stage 6) #2900 — Stage 6 (CI regression gate).
- Meta: ESP32-S3 binary-size reduction — Batch 3 (successor to #2773) #2856 — Batch 3 (parallel structural meta — that's where the next round of real savings will come from, not Stages 4 + 5 of Meta: ESP32-S3 Blink bloat reduction (file:line concrete plan) — supersedes #2885 #2886).
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
docs(esp32): close out #2886 Stages 4 + 5 — audited / no action (#2902)