Repository navigation
Description
Context
Merged PR #4563 bound the compile-time ESP-IDF5 WS2812 encoder at channel construction. On the same ESP32-S3 Blink build, Channel::showPixels fell from 4,164 B to 2,584 B and whole-firmware flash fell 7,768 B. Only the WS2812 encoder/writer remains among protocol writers, so unused writer retention is no longer the Blink problem.
The common Channel::showPixels still includes the runtime pre-bound/dynamic branch (src/fl/channels/channel.cpp.hpp) and the resolveDynamicDriver() symbol is 628 B. Closed #2981 requested a ~1,000 B showPixels symbol and a 60 Hz / 100 LED frame-time check; those criteria were not completed by #4563. The current image is therefore a concrete starting point for the remaining dispatch work.
Proposal
Separate the pre-bound legacy addLeds<>() path from manager-created dynamic channels so the static ESP32-S3 Blink call path need not carry generic driver resolution and related setup in its hot function. Prototype the smallest viable entry-point/specialization boundary and compare both the named symbol and whole firmware; preserve dynamic Channel::create(config) semantics and error handling.
Acceptance criteria
- RED: a focused symbol-size check on current Blink records
showPixels == 2,584 Band fails the ~1,000 B target; existing tests preserve static and runtime channel behavior before changes. - GREEN: same-toolchain Blink
showPixelsis below ~1,000 B, unused protocol writers remain absent, and whole-firmware flash decreases after accounting for any new helpers or thunks. - Generic
Channel::create(config)selection, SPI channels, RGBW/RGBWW, channel events, disabled-driver behavior, and failed-driver handling retain byte/output parity in focused tests. - A 60 Hz, 100-LED WS2812 frame-time comparison shows no measurable regression on target hardware or a documented equivalent timing harness.
Decisions
- P2: the PR delivered real savings, but the original per-symbol and timing targets remain open.
- Focus on static versus dynamic channel entry points; repeating the writer-binding refactor would duplicate refactor(channels): bind RMT5 pixel encoder at construction #4563.
- Keep dynamic API behavior available by default; do not depend on
FASTLED_DISABLE_DYNAMIC_DRIVERfor the general fix.
Related issues
- bloat: virtualize per-chipset writer dispatch in fl::Channel::showPixels (stop inlining 3 writer templates into one symbol) #2981 is the closed original dispatch issue; PR refactor(channels): bind RMT5 pixel encoder at construction #4563 is its partial implementation. Meta: ESP32-S3 binary-size reduction — Batch 3 (successor to #2773) #2856 item 3.1 tracks the broader static-dispatch architecture.
- research: tree-shake unused Channels encoders like unused drivers #3947 researches compiler-elidable encoder binding; this issue concerns the residual presentation path after Blink already strips unused encoders.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
feat/meta work 4566 (#4574)