Repository navigation
Description
GPIO/power-indicator/ISR closure under final validation
The remaining default-image pin imports came from optional power-indicator operations and bulk GPIO writers. The existing setter now installs a private callback for its exact Pin::hi()/lo() operations; pin0 clears the callback. Whole GPIO/PWM/analog and bulk-pin bodies share one independent provider, so platform-private ADC/PWM state still has a single translation-unit owner. ISR implementation is independently owned. Public APIs remain available; explicit SDK consumers exercise their strong linkage.
Against 90fa0645b8, default minimal Blink measures:
| Profile | Flash | Static DRAM | Flash change | DRAM change |
|---|---|---|---|---|
| Legacy ESP32 | 273,173 B | 17,496 B | -984 B | 0 B |
| Modern ESP32 | 289,927 B | 25,036 B | +4 B | 0 B |
| ESP32-S3 | 353,571 B | 23,416 B | -20 B | 0 B |
All three board builds, lint and independent reviews passed. Existing power/PWM/pin/ISR tests passed with sanitizers; a new observer test verifies actual power-budget dispatch, pin reassignment, disable/re-enable and restoration. An initial attempt to observe physical pin values in native stub tests was rejected because stub Pin::hi/lo are intentionally no-ops; it was removed. The new test does not claim native GPIO toggling. Explicit GPIO/ADC/PWM/power-indicator/ISR consumers compiled/linked on both legacy and modern SDKs. Full native validation is running before source publication.
The previous committed hosted build measured 353,607 B at exact 90fa0645b8 (run37672955278); downloaded provenance matches. Budget passed and the ratchet rejected only the unclaimed220B saving. Commit 38bdb4a0c8 pins that observed baseline; its focused gate37675361815 is running. No hosted size is yet claimed for this new GPIO candidate. #4707 remains open; restoration is incomplete.
Bitbang ownership and constant vector tables committed — 90fa0645b8
The final native gate resumed from the retained cache and passed 323/323 unit suites and 95/95 examples (71.76 s), after the earlier compilation deadline. The portable-bitbang ownership split is committed as 5dd64a9861; constant vector tables as 90fa0645b8. Both are pushed to PR #4736. Targeted bitbang/vector/iterator sanitizer tests, lint, independent reviews, all three Blink SDK builds and the explicit bitbang SDK consumer passed.
Compared with a9f87dd90c, combined minimal Blink savings are 2,452 B flash / 72 B static DRAM on legacy ESP32, 152 / 88 B on modern ESP32, and 140 / 64 B on S3. Totals: 274,157 / 17,496 B, 289,923 / 25,036 B, 353,591 / 23,416 B respectively. These profiles measure ordinary default functionality; no RMT feature was disabled and no static RAM was shifted to the heap. The vector tables previously required runtime initialization; constant function addresses remove their guards and place the tables in read-only storage.
Matching old-sketch checks remain 289,433 / 17,520 B legacy Serial Blink (gap 26,676 flash / 248 static DRAM from 3.10.3), and 296,311 / 25,764 B modern public gist (flash gap 21,390 B). Minimal Blink totals are not interchangeable with those controls.
A focused hosted S3 measurement is requested for 90fa0645b8; its result is not yet known, so no new hosted baseline is guessed. The latest observed older hosted value is 353,747 B at a9f87dd90c, while the committed ratchet still reflects the earlier measured353827. The remaining pin/PWM closure is a researched candidate, not an implemented saving. This issue stays open.
Native gate status and next closure audit
The full native gate for the pending bitbang/vector changes reached 968/1,058 build steps, then hit its 600-second compilation deadline while linking. This was a build timeout before test assertions ran, not a reported behavioral failure. The same bash test --cpp gate is resumed from the retained build cache; the changes remain uncommitted until full validation passes. Targeted bitbang, vector and iterator sanitizer tests and all SDK builds already passed.
The next pin/PWM split is not yet implemented. Review found that a naïve two-translation-unit split would duplicate platform-private ADC/PWM state and create an ODR risk. A safer possible closure isolates the optional power-indicator setter/Pin operations behind a private callback installed by that setter, then moves whole pin and bulk-pin implementations together into one provider and isolates ISR implementation. Zero-pin disabling and indicator updates for both budget branches must remain unchanged; no savings or runtime verification are claimed for this candidate.
Fresh matching-sketch comparison for the pending bitbang/vector reductions
Rebuilt the exact earlier Serial-enabled Blink control and the public gist, rather than comparing today's minimal Blink with the old Serial sketch:
- Legacy ESP32 Serial Blink now 289,433 B flash / 17,520 B static DRAM, compared with the matching 3.10.3 control 262,757 / 17,272 B: remaining gap 26,676 B flash / 248 B static DRAM.
- Modern ESP32 public gist (pin12 and forward-declaration adaptation unchanged) now 296,311 B flash / 25,764 B static DRAM. Its matching 3.10.3 flash control is 274,921 B, leaving 21,390 B flash. This controlled profile differs from the original reported PlatformIO configuration.
These are actual fresh build/report measurements of the pending worktree changes, not predicted deltas. Both SDK builds passed and reports were preserved; board builds are being restored to minimal Blink. Full native validation is still live. The bitbang ownership and constexpr-vector changes remain uncommitted until it passes.
The next archive audit found unused PWM/analog implementation rooting ISR machinery. Whole-pin isolation would not close the dependency because core metadata imports digitalRead/digitalWrite; a candidate must retain those two wrappers and move PWM/analog state together, preserving explicit pin/ISR users. No such change is implemented or claimed yet. #4707 remains open.
New bloat sources and measured reductions — validation in progress
Two concrete sources remain removable without disabling RMT functionality:
- The unused portable bitbang driver shared the platforms archive object with RMT4. Giving its unchanged implementation an independent canonical provider saves 344 B legacy ESP32, 8 B modern ESP32, and 4 B S3. An explicit
BusTraits<Bus::BIT_BANG>SDK consumer compiled/linked, and existing bitbang behavioral tests passed under sanitizers. Its implementation, public headers and platform gates are unchanged. - Two vector operation tables contain constant function pointers but were initialized dynamically. Named template thunks and constexpr selectors permit constant initialization without requiring constexpr lambdas. On legacy ESP32 this saves another 2,108 B flash and 72 B static DRAM: two 28 B tables and two 8 B guards no longer occupy static DRAM. Copy/move/default/swap SFINAE and existing exception annotations are preserved. SDK build, lint and independent review passed; vector sanitizer validation passed after its automatic compiler-cache retry (230.09 s including build), and the iterator sanitizer test covering move-only/deleted-copy/deleted-default operations passed (10.56 s). The explicit bitbang SDK consumer also compiled/linked with the vector change applied.
Combined legacy minimal Blink now measures 274,157 B flash / 17,496 B static DRAM, against the prior committed 276,609 / 17,568 B. All three SDK builds passed. Against the bitbang-only intermediate build, vector constant initialization additionally saves 144 B flash / 88 B static DRAM on modern ESP32 (now 289,923 / 25,036 B) and 136 B flash / 64 B static DRAM on S3 (now 353,591 / 23,416 B locally). The final full native suite is running for both changes. These changes are not committed yet and do not prove restoration to 3.10.3; this issue remains open.
The preceding hosted run 37670173483 measured 353,747 B at exact a9f87dd90c, with downloaded provenance matching. Its budget passed and the ratchet rejected solely the 80 B unclaimed saving. That older value does not establish the hosted size of these new candidates.
Shared inline append path committed — a9f87dd90c
The inline and borrowed-string branches duplicated append copying. Sharing that copy while keeping borrowed-prefix copying, alias lifetimes and each branch's original reset/length/terminator order saves 44 B legacy ESP32 and 56 B ESP32-S3 against 8d9efc3f56; modern ESP32 is unchanged. Current minimal Blink totals: 276,609 / 17,568 B legacy flash/static DRAM, 290,075 / 25,124 B modern, 353,731 / 23,480 B local S3. No static DRAM change.
All three board builds, lint and independent review passed. Constructor/view sanitizer tests passed; the append sanitizer test was explicitly forced to run after an initial cached result. Full native validation passed 323/323 unit suites and 95/95 examples (272.88 seconds). This reduction is committed and pushed as a9f87dd90c; its hosted measurement is requested separately.
The previous baseline's focused hosted gate 37668527485 passed at exact b79c7cb96b: default 353,827 B, slim 345,163 B. Both downloaded reports and provenance match that commit. The earlier 24 B heap-growth saving and this candidate's 56 B saving still require hosted measurement. #4707 remains open; comparison with 3.10.3 must continue to use the matching sketch control.
Heap-growth reduction committed — 8d9efc3f56; hosted lookup saving claimed
Run 37667663392 measured 353,827 B default S3 flash at exact 04c52a51dc; downloaded report and provenance agree. Its budget passed. The ratchet failed solely because this 408 B saving was unclaimed, and the baseline is now pinned to the observed 353,827 B. The later RMT4-only helper reduction does not affect S3. A focused rerun is being dispatched; full board CI remains off.
A further heap-growth consolidation is under validation: removing two duplicate grow() calls while preserving alias-offset handling measures 276,653 B legacy ESP32 (another -20 B), 290,075 B modern ESP32 (unchanged), and 353,787 B local S3 (another -24 B). Before/after append sanitizer tests, lint, three board builds and independent review passed. Full native validation passed 323/323 unit suites and 95/95 examples (263.98 seconds). This reduction is committed and pushed as 8d9efc3f56; its hosted S3 size is not yet measured. These remain current minimal Blink controls, not the old Serial sketch. #4707 remains open.
RMT4 timing conversion reduction — c15d619235
The zero/one pulse helpers duplicated the same three CPU-cycle conversions. One private helper now computes those conversions once and writes both SDK symbols. Independent review verified separate unsigned rounding, sum-before-division, bitfield truncation, zero-before-one assignments and unchanged reset/fill timing logic. No optional feature was disabled.
Measured against 04c52a51dc, legacy ESP32 Blink drops another 36 B to 276,673 B flash / 17,568 B static DRAM. Modern ESP32 stays 290,075 / 25,124 B and ESP32-S3 stays 353,811 / 23,480 B; those profiles use RMT5. All three board builds, lint and review passed. Full native validation passed 323/323 unit suites and 95/95 examples (15.51 s). SDK builds and source review support this refactor; these checks do not constitute hardware waveform or runtime packed-symbol validation.
PR #4736 is pushed at c15d619235. The earlier Serial-enabled 3.10.3 control remains a separate comparison; these minimal Blink totals cannot be used to claim that whole difference as a library saving. Restoration to 3.10.3 remains incomplete, so this issue stays open.
Additional measured optimization — committed as 04c52a51dc
ChannelManager::isDriverEnabled() was constructing a temporary fl::string for every driver-name comparison. Comparing length and bytes directly preserves case sensitivity and embedded-NUL behavior while removing that work. Against the rebased PR at df03ab0a36, the same Blink builds now measure:
| Profile | Before flash | After flash | Saving | Static DRAM (unchanged) |
|---|---|---|---|---|
| Legacy ESP32 / IDF4.4 | 277,057 B | 276,709 B | 348 B | 17,568 B |
| Modern ESP32 | 290,391 B | 290,075 B | 316 B | 25,124 B |
| ESP32-S3 | 354,219 B | 353,811 B | 408 B | 23,480 B |
These are the current minimal Blink controls, not the earlier Serial-enabled 3.10.3 comparison. The added exact-name behavioral test passed with sanitizers; all three board builds, lint, and independent review passed. Full native validation passed: 323/323 unit-test suites and 95/95 examples (278.23 seconds). The optimization is committed as 04c52a51dc on PR #4736.
The previous committed ESP32-S3 baseline was independently verified by focused hosted run 37663621357: default 354,235 B and slim 345,707 B, both from exact commit df03ab0a36. The new lookup optimization has not yet been measured on the hosted runner. Issue remains open; restoration to 3.10.3 levels is incomplete.
Current investigation status
Reopened and unresolved. Work is in PR #4736, rebased onto origin/master, and remains unmerged. Detailed measurements and validation are maintained in the investigation comment.
At df03ab0a36, the unchanged controlled Serial Blink measures 292,333 B flash / 17,592 B static DRAM on legacy ESP32, versus same-toolchain real-RMT 3.10.3 262,757 B / 17,272 B. The matched gap is 29,576 B flash / 320 B static DRAM. Updated minimal Blink is 277,057 B / 17,568 B, including upstream removal of Serial; that sketch saving is kept separate from library reductions. The public gist on modern ESP32 is 296,919 B / 25,924 B, with a controlled 3.10.3 flash gap of 21,998 B. These configurations differ from the original PlatformIO reports.
Two additional string optimizations save 372 B legacy / 304 B modern / 464 B S3, with static DRAM unchanged. Full native verification passed 323 units and 95 examples; targeted sanitizer tests, C++ lint, reviews and three SDK board builds passed. The hosted S3 report measures 354,235 B, now pinned without predicted headroom. Its gate failed only because the saving was previously unclaimed. The ci-full label was removed externally and the hosted sweep was cancelled. The label remains off; the focused final-head S3 gate is running. Full hosted validation remains incomplete. Production Windows has the known linker argument failure; both candidate-linker Windows diagnostics passed on identical C++ source. External linker release approval remains pending. The RMT rewrite and supported runtime features remain enabled. Physical hardware behavior is not established by these tests.
Report
A user (Reddit) reports a large flash and RAM regression between FastLED 3.10.3 and 3.10.6 on a Lolin D32 (ESP32) board, compiled with PlatformIO. The sketch is their posted CD77_FastLED_Four_Glass_Jars.
| Version | RAM | Flash |
|---|---|---|
| 3.10.3 | 26,532 B (8.1%) | 297,965 B (22.7%) |
| 3.10.6 | 34,996 B (10.7%) | 741,201 B (56.5%) |
| Delta | +8,464 B (+32%) | +443,236 B (+149%) |
Flash grew about 2.5x for the same sketch between two patch releases.
Next steps
- Reproduce on
esp32dev/lolin_d32with a comparable sketch at 3.10.3 vs 3.10.6 (and current master). - Use
bash bloat <board>to find which symbols account for the ~433 KB of new flash. Likely suspects are newly linked drivers, ChannelManager, printf/iostream, or audio/codec code reachable from static initializers. - Bisect the 3.10.3..3.10.6 range if the cause isn't obvious.
- Consider adding a flash-size budget check for a baseline ESP32 sketch to CI so this kind of regression gets caught.
Additional reproductions provided by the reporter
The reporter supplied the following PlatformIO results on a Lolin D32. These are reported results, separate from the controlled builds used for optimization.
| Sketch | Version | Flash | RAM |
|---|---|---|---|
CD77_door_hook_rope_matrix |
3.10.3 | 297,965 B | 26,532 B |
| Same sketch | 3.10.6 | 731,941 B | 32,512 B |
| Public test gist, pin 12 | 3.10.3 | 268,893 B | 21,992 B |
| Same gist | 3.10.6 | 728,001 B | 30,808 B |
The gist increase is 459,108 B flash / 8,816 B RAM. A private sketch is not required: the public gist and existing examples provide reproducible investigation targets. The reporter also noted many yellow warnings in the 3.10.6 builds; their warning text has not been provided, so no warning cause is inferred.
Another supplied comparison measured 287,930 B flash / 23,690 B RAM on 3.10.3, 352,120 B / 26,892 B on 3.10.6, and 320,660 B / 26,820 B on master with #4710 + #4717. This is a separate reported configuration.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTriage
Activity
zackees commentedon Oct 6, 2026
Note: these numbers are from the newest release (3.10.6), so the regression is in what users are installing now. Priority: high.
zackees commentedon Oct 6, 2026
Fixed by #4710 and #4717 (meta #4709).
ESP32 DemoReel100 (esp32dev), same fbuild setup for each version:
What changed:
fl::printfengine no longer links (ESP32-S3 Blink −6.8 KB).FL_ERRORand dropFL_WARN/FL_INFOtext by default (−24 KB on ESP32-S3 Blink).-DFL_LOG_LEVEL=2restores full logging, andFASTLED_LOG_VERBOSITY=1keeps its old meaning (full).The remaining ~33 KB over 3.10.3 is the newer RMT5 channel engine and ChannelManager, which is new functionality rather than waste.
I couldn't reproduce the reported 741 KB (2.5x) with stock examples. If your sketch is still far above these numbers on the next release, please reopen this issue and attach the sketch and your
platformio.ini. A jump that large usually means a whole subsystem is being linked:FastLED.add(cfg)enrolls every driver by design (#2459), and audio and networking are other candidates.zackees commentedon Oct 7, 2026
Still unresolved after the RMT driver rewrite. Updated measurements on the affected sketch: 3.10.3: 287,930 B flash / 23,690 B RAM; 3.10.6: 352,120 B flash / 26,892 B RAM; master with #4710 and #4717: 320,660 B flash / 26,820 B RAM. Master remains 32,730 B flash and 3,130 B RAM above 3.10.3. Reopening to track further flash reduction against this same-sketch baseline.
zackees commentedon Oct 7, 2026
Controlled follow-up: using the same current esp32dev fbuild toolchain, release flags, and Blink example, master measures 310,964 B flash / 26,084 B RAM. Replacing only the FastLED source with 3.10.3 (and making the scratch harness compatible) measures 284,886 B flash / 23,386 B RAM: +26,078 B flash and +2,698 B RAM on master. Symbol attribution shows libFastLED.a grows from 6,459 B to 24,575 B (+18,116 B); current linked code is concentrated in the ESP32 platform/RMT implementation (~8.9 KB), generic channel layer (~5.4 KB), and fl::stl (~4.8 KB). The C library printf code is approximately the same size in both builds, so it does not explain this controlled regression. This is a Blink baseline, not a reproduction of the original PlatformIO firmware bytes; the issue remains open for reduction and validation against the simple gist as a second workload.
zackees commentedon Oct 7, 2026
Implemented a further reduction in PR #4736: #4736. This issue remains open because flash and RAM are still above 3.10.3.
Controlled ESP32 comparisons, using identical current framework/toolchain and flags (allocated file-backed ELF image flash):
Static RAM falls from 26,084 to 25,692 B for Blink and 26,852 to 26,484 B for the gist. The corresponding 3.10.3 baselines are 23,386 and 23,410 B. ESP32-S3 image flash is 359,003 B, 8,404 B below the committed 367,407 B size ratchet.
The changes reduce redundant RMT queue/state and dispatch code, avoid a TX copy where internal SRAM can be used directly while retaining ownership, and remove unused task/PWM/HTTP/SPI linkage. Dynamic strip counts, network detection, runtime color configuration, DMA/external RAM and padding transforms remain supported.
The remaining increase is concentrated in the newer RMT/channel/STL support. Classic ESP32 also retains 1,308 B of WiFi NVS through vendor/network detection linkage. Large libc formatting routines were already present in 3.10.3, so they do not explain this regression.
These controlled fbuild builds use pioarduino 55.03.311, Arduino 3.3.11, ESP-IDF 5.5.5 and GCC 14.2; they do not reproduce the reporter's older PlatformIO environment exactly. Native validation passed all 414 tests/examples, focused RMT/task sanitizer runs and lint passed, and both ESP32 and ESP32-S3 compiled. No physical hardware validation was performed. Full hosted CI is requested on the PR.
zackees commentedon Oct 7, 2026
Pushed a second reduction pass to PR #4736 (edd79e8): #4736.
Same-toolchain ESP32 image flash totals now are:
Static RAM is now 25,604 B for Blink (-480 B versus master) and 26,388 B for the gist (-464 B). These remain 2,218 B and 2,978 B above the controlled 3.10.3 RAM baselines.
ESP32-S3 hosted image flash is 357,679 B, 9,728 B below the original 367,407 B ratchet (run 37581805753). Local image flash is 357,663 B; commit cb41f69 pins the threshold to the exact hosted result, with no discretionary headroom.
The additional changes lazily construct the driver diagnostic cache, fix hardware channel storage at the SoC's physical limit while retaining dynamic logical strips, remove unused encoder/iterator state, and avoid constructing detailed error results on the driver's boolean allocation path. The public detailed errors remain available; the corresponding result symbols disappear entirely from Blink. Encoder initialization failure now propagates correctly and cleans up partial allocations.
Native coverage now explicitly compiles the real production allocator, testing TX/RX outputs, detailed errors, fallback, exhaustion and accounting. The full native suite passed all 414 tests/examples; focused production allocator and RMT debug runs passed with sanitizers, and lint passed. Two full-CI ATmega8 example overflows reproduce byte-for-byte on the base revision. Physical hardware validation is still outstanding.
The issue remains open. The remaining RMT/channel/STL cost is still substantial; these measurements do not claim restoration to 3.10.3. A native TLS trial was rejected because its small flash saving would introduce 16 B of stack use in every ESP32 task.
Further reductions in 2f8b453
Matching default builds, comparing the saved JSON
image_flashfield:This pass saves another 992 B flash in both ESP32 sketches and 328 B static RAM. Current static RAM is 25,276 B / 26,060 B, total savings of 808 B / 792 B versus original master. ESP32-S3 default image_flash is 356,675 B locally, another 988 B below the second pass.
The largest new finding is four C++ locale initializers (816 B attributed). Scope-only unique_lock operations in interner/UI unity files, plus unused ESP32 condition-variable operations, extracted a system-error/locale dependency chain. Replacing those scope-only guards with lock_guard and isolating the unchanged condition-variable implementation removes the initialization chain. Locking scopes and the public condition-variable API are preserved. A sketch explicitly using ESP32 condition-variable wait still compiles and links through the new unit.
The pass also unifies RMT memory accounting and constant-folds encoder clock calculations. Correction to the earlier trial note: the wrapper's CLI Firmware flash line was mistakenly compared with a saved JSON image_flash baseline. The saved reports show that unified accounting saves 64/72 B, and clock specialization saves 28/24 B on ESP32/S3. Both reductions are reinstated and validated together.
Full forced native validation passes all 319 units and 95 examples. Production allocator, global interner and UI sanitizer runs, C++ lint and code review pass. Full Python validation passes 1,750 tests after refreshing a stale WASM include-path configuration through the official clean build wrapper; WASM Blink also builds successfully. Physical hardware validation remains outstanding.
Hosted run 37584376133 measures image_flash 356,691 B, 16 B above local and 10,716 B below the original S3 baseline. Static RAM is 77,392 B, saving 824 B versus the original S3 measurement. Commit 0c3a211 pins the ratchet to that exact hosted result; the initial gate failed solely because this additional 988 B saving had not yet been claimed in the threshold. The corrected gate 37584819636 passed completely. Both existing review threads are resolved.
#4707 remains open; there is still a measurable gap from 3.10.3.
Fifth reduction pass (03f7fb4)
Same controlled toolchain/profile; saved JSON
image_flashmeasurements:This pass removes unused private driver-entry copy callbacks and moves registration names. A sanitizer test verifies ownership and debug name safety when a driver callback clears the registry. Smaller listener inline storage saves another 96 B static RAM and 96 B per snapshot stack frame on ESP32. Listener count remains unlimited; more than four listeners now allocate registry/snapshot storage. Tests cover 20–39 listeners, stable priorities, duplicate registration and mutation during dispatch.
Static RAM: Blink 25,180 B, gist 25,964 B, S3 77,296 B. Full native run passes 320 unit modules and 95 examples; focused new tests pass with sanitizers. C++ and changed Python file lint pass. Fixed a second test cache shortcut that ignored
--force; official clean verification exposed and corrected a typo in the new test before publication. Full Python rerun passes (251 s). Hosted run 37587043130 confirms fifth-pass image_flash=356,431 B; the strict gate reports 260 B of unclaimed savings against the old baseline.The issue remains open. Compared with controlled 3.10.3, the remaining flash gaps are 17,066 B for Blink and 22,730 B for the gist. The user's much larger 3.10.6 PlatformIO increases remain useful regression evidence, but these controlled measurements do not reproduce that entire 459 KB increase.
Sixth reduction pass (31be8d4)
Reusing known string lengths eliminates unused holder construction; reordering private RMT channel state removes four padding bytes per physical channel. Same-toolchain JSON image_flash:
Static RAM is unchanged this pass: 25,180 / 25,964 / 77,296 B. RMT engine heap payload shrinks by 32 B on classic ESP32 and 16 B on S3. Full native run passes 320 unit modules plus 95 examples; string and RMT driver sanitizer runs pass. C++ lint and code review pass. A trial sharing the two string-copy bodies increased flash by 28–52 B and was reverted. Hosted run 37587891982 confirms image_flash=356,311 B and static RAM=77,296 B. Commit dee98ca claims that exact artifact value; corrected gate 37588394479 passes completely. Total hosted flash reduction is 11,096 B, static RAM reduction 920 B.
The classic ESP32 RAM audit also identifies 1,312 B of retained vendor WiFi mode-query state. Weak references work correctly; supported alternative observers examined miss AP/configured-mode cases, so exact runtime detection is preserved. The issue remains open.
Controlled historical check: 3.10.6 source (ebf8c28), the same modern Arduino3.3.11/IDF5.5.5/GCC14.2 harness, and existing Blink measure 313,963 B image_flash / 26,532 B RAM with
NDEBUG. Removing onlyNDEBUGproduces 343,671 B / 26,564 B. The older default logging behavior therefore accounts for 29,708 B in this experiment. This identifies a contributor; it does not reproduce or account for the entire user's ~459 KB increase. An Arduino2/IDF4.4 three-version comparison is running.Legacy ESP32 reproduction and seventh reduction pass (6d89aaf)
Existing Blink reproduces the large regression on one fixed legacy profile: espressif32 4.4.0, Arduino 2.0.3, IDF 4.4.1, GCC 8.4.0, with exceptions enabled. These are controlled fbuild measurements, separate from the reporter's PlatformIO build.
The linker identified an ESP-DSP umbrella header pulling in C++ streams and locale initialization, and scope-only
unique_lockguards pulling in system-error support. Narrow FFT declarations andlock_guardremove those roots. Separating audio entry points, FFT-bin formatting and ASIO from core/STL translation units then removes unused subsystem unwind tables without disabling exceptions or changing sketch functionality.This pass saves 337,084 B versus 3.10.6 and brings static RAM 56 B below this profile's 3.10.3 baseline. Flash still exceeds 3.10.3 by 86,820 B; #4707 remains open.
The unchanged modern profile measures Blink 304,607 B and CD77 gist 297,499 B. Hosted run 37593627529 confirms ESP32-S3 image_flash=356,331 B (local 356,315 B). This is an intentional 20 B increase over the sixth pass from independent translation units, in exchange for removing 313,488 B from legacy Blink; commit 6a20262 pins the exact hosted value. The initial size gate fails only on this unpinned cost; corrected gate 37594176693 passes completely, including slim smoke. Full Python validation passes 1,754 tests, plus 34 focused runner tests after final alias changes. All 418 registered native units/examples pass with sanitizers. Full lint and code review pass. AudioReactive links on the legacy SDK, AudioFftParity links on both SDK generations, and Uno/WASM Blink compile successfully. Physical device behavior remains unverified.
Verification also fixed forced-test execution skipping cached tests, standalone probes missing from compilation aliases, and cache rebuilds removing execute permissions after repair. The sanitizer gate exposed existing signed arithmetic errors in parsing, formatting, gradients and wave conversion/update; those are corrected with boundary coverage. The latest source is published in PR #4736; hosted size and full platform CI remain gates before merge.
zackees commentedon Oct 7, 2026
Unity-build scope correction (2026-10-07)
The maintainer flagged excessive unity-build partitioning in PR #4736. I am consolidating optional groups and keeping boundaries justified by measured linker reachability.
The uncommitted trial returns corkscrew and geometric noise to the existing graphics unity unit, removing two compilation entries. Blink image flash is unchanged versus the GPIO candidate: 273,173 B legacy ESP32, 289,927 B modern ESP32, 353,571 B ESP32-S3. C++ lint passes; full native validation of consolidation is running. These are candidate measurements, not published-source claims.
The preceding GPIO candidate passed 323 native tests and 95 examples. Published revision
38bdb4a0c8passed focused hosted size run 37675361815. The unrelated WASM diagnostic-artifact workflow change was removed ind67c812e6c.Issue remains open. The remaining gap to 3.10.3 and production Windows dependency limitation remain unresolved.
Current source:
df03ab0a36— rebased and two further string reductionsPR #4736 was rebased onto
origin/masterata439902ac6; the repository has noorigin/main. Upstream SPI storage, compact allocation records, controller indexing and wave fixes were retained. The issue remains open and unresolved, and the PR remains unmerged.Two additional changes preserve supported runtime features and the allocation/exception policy:
e978f089d5) moves the original protected mutable heap accessor into the optional string provider and uses direct storage access only where heap ownership is already established. Derived callers retain the original lazy-allocation behavior. Same-sketch flash savings: 148 B legacy ESP32, 160 B modern ESP32, 228 B ESP32-S3.09edb30eea) shares literal/view materialization's copy-and-allocation tail, preserving length updates, copying before storage reset, and allocation before assignment. Further savings: 224 B, 144 B and 236 B, respectively.Static DRAM is unchanged by these two source optimizations. Combined same-sketch flash savings are 372 B legacy / 304 B modern / 464 B S3.
Keep sketch changes separate: upstream removed Blink's Serial output. Rebuilding the exact earlier Serial Blink gives 292,333 B / 17,592 B on legacy ESP32. The saved 3.10.3 control sketch is byte-identical to this control; its same-toolchain real-RMT baseline is 262,757 B / 17,272 B. The remaining matched gap is therefore 29,576 B flash / 320 B static DRAM, not zero. The rebase alone saved 20 B flash / 16 B static DRAM on that unchanged control. Minimal Blink's larger reduction includes removing Serial and is not counted as a library-only saving against the old control.
The reporter's public gist, pin12, now measures 296,919 B flash / 25,924 B static DRAM on modern ESP32. Earlier controlled 3.10.3 gist flash was 274,921 B, leaving 21,998 B. The explicit forward declaration required by this build harness remains the only adaptation besides the pin. These controlled configurations differ from the reporter's PlatformIO setup.
Validation: real legacy, modern and S3 SDK builds pass; the SDK consumer using the protected accessor also compiles and links. Relevant literal/view and mutable-storage tests pass with sanitizers and UBSan halt-on-error; C++ lint and independent reviews pass. Full native verification passes 323 unit tests and 95 examples (421.79 s) on the rebased string implementation. The final commit changes only the S3 baseline data. Compilation/linkage and host tests do not establish physical RMT waveform or interrupt behavior.
The downloaded hosted S3 report at
09edb30eeameasures 354,235 B; report and provenance agree. Its gate failed solely because the 752 B saving was unclaimed. The baseline now pins that observed value. Theci-fulllabel was removed externally, cancelling the hosted sweep and its S3 run. The label remains off. A focused manual S3 gate is running against the final baseline commit; full hosted validation is incomplete.Production Windows failures still report unsupported
--allow-shlib-undefined. The candidate-linker diagnostic branch has identical C++ source: examples passed and units passed. These diagnostics do not replace the production dependency. External linker release approval remains pending.Historical results below apply to their named source revisions. The final earlier
9bad7c2ddcmanual sweep completed 95 successful workflows / two Windows failures, with 117 of 119 required jobs successful, all 97 workflow SHAs verified; it is not validation of this rebased head.Historical source:
9bad7c2ddc— remove generic matcher roots from final RMT4 implementationControlled legacy ESP32 Blink now measures 292,725 B flash / 17,608 B static DRAM, another 944 B flash reduction. Against the same-toolchain real-RMT 3.10.3 baseline (262,757 B / 17,272 B), the remaining gap is 29,968 B flash / 336 B static DRAM. Modern ESP32 Blink remains 304,387 B and local S3 remains 354,971 B. These controlled builds differ from the original PlatformIO configuration.
Pass 36 specializes
canMatchonly on finalChannelEngineRMT4Impl, matching the existing RMT5 approach. This class always reports clockless-only support and inherits empty pin groups, independently of peripheral injection or runtime initialization. Thus its inherited results are exactlyNoPinfor clockless andNoProtocolotherwise. The override preserves those results without retaining the general group/timing matcher through its vtable; the generic matcher is absent from the resulting Blink report. Public base/custom-driver behavior, runtime selection, peripheral injection, timing, IRQs, queues, and allocation/exception policy are unchanged. Future capability/pin-group expansion must update this optimization.The expanded generic empty-group regression verifies protocol rejection precedence, bulk requests beyond capacity, and empty requests. It passed with sanitizers before the source change. Full native verification passed 418 tests (323 units, 95 examples; 15.06 s); final C++ lint and independent three-file review passed. A real ESP32 SDK sketch calling factory-created RMT4
canMatchcompiled and linked successfully. Generic host tests are not RMT4 engine integration, and neither hardware execution nor runtime execution of the SDK fixture is claimed.The public reporter gist, pin 12, was rebuilt: 297,271 B flash / 25,972 B static DRAM on modern ESP32 and 285,901 B / 18,392 B on legacy ESP32. The only adaptation besides the pin is an explicit forward declaration normally supplied by Arduino sketch preprocessing. Earlier controlled modern 3.10.3 gist flash was 274,921 B; the current gap on that configuration is 22,350 B. These are not reproductions of the reporter’s exact PlatformIO setup.
Pass 35’s hosted run 37653272928 at
0e93c35046measured 354,987 B; the gate failed solely because its 204 B saving was unclaimed. Report and commit provenance were downloaded and inspected. This commit pins the observed 354,987 B baseline, without predicted headroom. New-source hosted gate 37654154875 passed on9bad7c2ddc, measuring 354,987 B, exactly matching the pinned baseline; report and commit provenance were inspected. Pass 35’s modern +16 B tradeoff remains; pass 36 changes neither modern nor S3 size in controlled builds.All 97 workflow dispatches / 119 required jobs were accepted for
9bad7c2ddcf1de62e45c92fceb92e3fafbcd2a5d. Every run’s actual SHA was verified: 97/97 match, zero observation errors. The initial snapshot showed 6 successful workflows, 49 running and 42 queued. A fresh snapshot now shows 73 successful workflows, 2 Windows failures and 22 still running. Both failure logs reportlld: error: unknown argument: --allow-shlib-undefined(examples, units); this is not a completed or all-green production sweep. The PR retainsci-full. Previous exact-source sweepedc517e708finished 95 successful workflows / 2 Windows failures, 117/119 required jobs successful, all 97 SHAs verified and no required jobs missing. Both Windows failures reportlld: error: unknown argument: --allow-shlib-undefinedwith the production reld pin. Previous diagnostics with identical source passed; refreshed diagnostics both passed: units and examples, diagnostic SHAe83a09a2244f849bebab90e52cdfa00fccb3768d. Only the two existing workflow templates differ from published source. External release approval remains pending; no candidate binary is represented as a genuine production release.Residual read-only audit: compared mapped FastLED sections grow 14,257 B text / 10,059 B read-only data / 49 B IRAM versus the controlled 3.10.3 report, leaving 5,603 B of the 29,968 B image gap in other libraries/layout. Current FastLED unwind tables total 20,096 B (part of the current image, not another additive delta). This does not prove every remaining byte unavoidable. RMT4’s two inline vectors support arbitrary logical strips beyond their inline capacity of 16; replacing them with fixed physical-channel queues would remove behavior. Of roughly 1,780 B retained vector-related text, 1,364 B is shared machinery needed by other live containers, leaving about 416 B queue-specific code before replacement costs. No causal 1 KB saving from a queue rewrite was established.
Issue #4707 remains open; PR #4736 remains unmerged.
Latest source —
2a31733db0(through pass 28)Controlled legacy Blink: 296,593 B flash / 17,608 B static DRAM, versus 262,757 B / 17,272 B in 3.10.3. 33,836 B flash / 336 B static DRAM remain. Passes 26–28 save 3,816 B beyond
5ef7f29fb2. Modern ESP32 Blink measures 304,511 B; local S3 measures 355,583 B. Reporter PlatformIO numbers remain a separate profile.Pass 28 moves 13 optional string utilities and the two line-input methods together into the existing optional string operations unit. An incomplete trial increased flash because discarded
readLine()still referencedtrim()and extracted the new provider before section collection; moving their complete dependency closure instead saves 540 B. Public signatures, read hooks, native line-reading preference, retry delay, timeout logic, string ownership and formatting bodies are unchanged. Six baseline entries migrate paths only; no extra canonical compilation unit is added.Verification: 418/418 native tests passed, full lint plus final C++ lint passed, real legacy/modern/S3/UNO SDK builds passed, and a legacy SDK consumer explicitly links every relocated string utility plus both input methods. No physical peripheral test is claimed. The pass-27 suite had one loaded wall-clock yield assertion failure; its sanitizer rerun, isolated quick rerun and full 418-test rerun passed without weakening the assertion.
Hosted S3 at pass 27 measured 355,595 B (run); its gate correctly failed 8 B above the previous baseline. The current-source hosted size measurement is running, and the baseline correction is awaiting that observed result. Current-source Windows diagnostics use source-identical branch
6075bd2a76, differing only in the existing workflow installation steps: units, examples. These use the candidate linker; the production release remains pending approval.The preceding
be99ac5e4ffull sweep finished 95 workflows successful / two production Windows dependency failures. Those results are for that earlier commit; final-source full CI is still required. Issue #4707 stays open and PR #4736 unmerged.Passes 26–27 —
34e2074cc8Controlled legacy Blink now measures 297,133 B flash / 17,608 B static DRAM. 3.10.3 measures 262,757 B / 17,272 B in the same legacy profile: 34,376 B flash / 336 B static DRAM remain. Passes 26–27 save 3,276 B beyond
5ef7f29fb2. Modern Blink remains 304,507 B. These controlled profiles are not the reporter's exact PlatformIO setup.Pass 27 isolates the existing task pumping implementation from timer/scheduler construction (−2,368 B), then gives CLED, UART input/output, and USB serial their own link units (−368 B). Function bodies and public header paths are preserved. Task callbacks, reentrancy handling, deadline clamping, OS deep yield, SDK/version guards, exception support, and runtime driver configuration remain intact. The existing LED UART driver's separate unit is unchanged. The savings remove unused retained exception metadata rather than disabling features.
Evidence: independent review passed; full lint passed; all 418 native tests passed for the executor trial, and the final combined-source native suite is currently running. Explicit public CLED/UART/USB/timer consumers compile and link with real IDF3, IDF4 and modern S3 SDKs; IDF3/IDF4/S3 also compile with
FL_ESP_USE_IDF_SERIAL=1. These are SDK link checks, not physical peripheral tests.Local S3 measures 355,579 B, 8 B above the previous local build. The hosted bloat measurement is running on exact source
34e2074cc827415e6929e45d2b5118b10d801a12; its baseline will be updated only from observed hosted evidence if required. Earlier full sweeps belong to earlier source commits and do not prove final-source success.Issue #4707 remains open and PR #4736 unmerged. The external Windows linker release is still pending approval; production Windows dependency failures are not counted as passing checks.
Current status —
5ef7f29fb2Issue #4707 remains open; this PR is unmerged. Existing Blink examples and the supplied gist reproduce the regression without requiring the custom sketch.
These are controlled profiles, not an exact reproduction of the reporter's PlatformIO setup. Legacy static DRAM is 17,608 B versus 17,272 B in the old control. Exceptions, logging, runtime configuration and RMT functionality remain enabled. No physical hardware validation performed.
Local validation: 418 native sanitizer targets, full Python (1,785 tests / 3,285 subtests), lint and independent review pass. All 97 required workflows are dispatched on exact SHA
5ef7f29fb2130a822ca75986986fa5da062c343e; full CI is still running. The published Windows linker pin remains unchanged. Its tested fix and release preparation are forge-ci/reld#220 and forge-ci/reld#221; separate release publication approval is pending.Eighth pass: optional compilation units and verified legacy RMT4
Published in PR #4736 at
6b266c1a5b.The older SDK comparison needed a correction: ESP-IDF 4.4.1 exposes RMT transmit channel counts but omits
SOC_RMT_SUPPORTED. Both 3.10.6 and the earlier current-source trials treated that absence as false and selected a fallback driver. Those earlier numbers do not establish the size of a retained RMT4 path. Detection now derives availability from the SDK's actual transmit-channel count, while preserving explicit support flags and user overrides.Corrected current Blink links real RMT4, verified by its retained transmit implementation and
rmt_driver_installin the linker map:Current saves 322,360 B versus 3.10.6 while restoring the RMT4 path. Against 3.10.3's working RMT build, the remaining gap is 101,544 B flash / 376 B RAM. Extra exception-unwind tables account for 77,236 B of the flash gap (76.1%); exceptions remain enabled.
The pass isolates dynamic channel construction, draw-list registration, RX factories/validation, path/corkscrew/noise graphics, shared SPI registries, ESP32 SPI and semaphores. The linker can now omit unused implementations without removing their APIs.
Enabling the previously excluded RMT4 code exposed stale TX/RX interface implementations and a GCC 8 literal-placement failure. The interfaces are restored. Three unchanged interrupt method bodies now live outside the class definition, retaining IRAM/noinline attributes; this fixes separate COMDAT literal pools under the standard SDK flags.
Modern matching-profile measurements: Blink 304,575 B; supplied minimal gist 297,431 B; ESP32-S3 Blink 356,227 B local image_flash. The hosted S3 measurement is 356,243 B; the baseline was updated to that measured result and the corrected gate passed: https://github.com/FastLED/FastLED/actions/runs/37600653172.
Validation: all 418 native sanitizer units/examples and the separate full example runner pass; modern SPI, multiple-SPI-bus and RX examples compile; legacy SPI and RX examples compile. Twenty capability/backend-selection cases pass. Full Python passed 1,773 tests with one source-text timing contract still pointing to the relocated ISR; the contract now checks the implementation, with all capability/timing checks passing in the focused debug rerun. The isolated QEMU rerun passes. Lint and code review pass.
Issue #4707 remains open. The next measured batch targets unused I2S/UART, channel SPI helpers, and math wave/noise implementations retained through shared compilation units.
Ninth pass: additional unused archive roots
Published in PR #4736 at
442efc18f4. Optional I2S/UART/RX implementations, channel SPI/adapters, math wave/noise, stream I/O and JSON writer now have independent compilation units. Shared SPI singleton startup retains its existing behavior while unused operations can be omitted.Legacy flash falls another 7,732 B, with static DRAM unchanged at 17,648 B. Against the same-toolchain 3.10.3 working RMT control, the remaining gap is 93,812 B flash and 376 B static DRAM. Extra unwind tables still account for 69,512 B of that flash gap. These controlled measurements are not direct reproductions of the reporter's PlatformIO numbers.
All 418 native sanitizer units/examples, the separate full example runner, full Python suite, lint and code review pass. Existing multiple-SPI-bus and RX examples compile on legacy ESP32 and modern ESP32-S3. Physical hardware behavior has not been tested. Ninth-pass hosted size verification passed, measuring 356,223 B on ESP32-S3: https://github.com/FastLED/FastLED/actions/runs/37602445886.
The issue remains open. The next pass addresses unused driver dispatch and JSON/ScreenMap/UI implementations still retained by shared compilation units; the existing examples are sufficient to trace these roots.
Tenth pass: driver dispatch and JSON/UI boundaries
Published in PR #4736 at
ccd2853fba. The optional driver dispatcher and CFastLED facade now link independently, as do JSON/string formatting, ScreenMap JSON bridges and shared UI. Public API, runtime driver registration, initialization order and implementation bodies are preserved.Legacy saves another 15,812 B with static DRAM unchanged at 17,648 B. The remaining same-toolchain gap to 3.10.3 is 78,000 B flash / 376 B static DRAM. Unwind sections shrink by 15,776 B; exception support is preserved. The current linker map still retains RMT4 and rmt_driver_install.
All 322 native sanitizer unit tests and 96 host examples pass, as do full Python, lint and review. Existing multiple-SPI-bus/RX examples compile on legacy ESP32 and SPI/RX compile on modern S3. The separate full example and slow Python wrapper also passed, including QEMU. Hosted verification passed at 356,187 B: https://github.com/FastLED/FastLED/actions/runs/37603441257.
Issue #4707 remains open. ActiveStripData still roots the JSON parser in Blink, and unused blur implementations retain graphics unwind frames; these are concrete next targets using existing examples. The reporter's PlatformIO measurements remain separate from these matching-profile controls.
Eleventh pass: tracking, blur and managed profiles
Published in PR #4736 at
9dbea6ec07. ActiveStripData and blur now compile independently. Managed color pipeline operations are separated from the same shared hook tables and notification trampoline; explicit profile binding retains the complete implementation and callback installation order.Legacy saves another 14,384 B; RAM is unchanged at 17,648 B static DRAM. JSON drops out of its Blink map; RMT4 and rmt_driver_install remain allocated. The controlled gap to 3.10.3 is now 63,616 B flash / 376 B static DRAM. Extra FastLED unwind tables contribute 38,488 B of that gap. Exceptions are preserved. This batch costs 40–56 B in modern profiles; those costs are included in the table rather than hidden.
All 322 native sanitizer unit tests and 96 host examples pass, including managed-color and graphics coverage. Full Python, lint and root review pass; legacy multiple-SPI/RX and modern S3 SPI/RX compile. Physical hardware behavior remains untested. Hosted measurement was 356,227 B; its gate flagged the tabled 40 B cost over the tenth-pass baseline, which now records that exact measured cost: https://github.com/FastLED/FastLED/actions/runs/37604777484.
The issue remains open. Further closed archive groups have been identified in drawing, configuration, waveforms and string interning; the next pass preserves their public APIs and real feature callers while omitting unused implementations from Blink.
Twelfth pass: drawing, configuration, waveforms and interning
Published in PR #4736 at
f00e266e57. Closed drawing implementations and the Tile2x2 raster bridge, channel configuration/waveforms, and string interning compile independently. Existing public callers, lazy state and implementation bodies are preserved.Legacy saves another 6,920 B and RAM remains 17,648 B static DRAM. The controlled 3.10.3 gap is 56,696 B flash / 376 B static DRAM. Extra FastLED unwind tables contribute 31,628 B of that flash gap; exception support and real RMT4 remain intact.
Native coverage: 321 units and 96 host examples pass in the full sanitizer run; its unchanged standalone layout probe was omitted by the runner, then passed directly in debug, covering all 322 registered units. The runner discovery gap is being fixed for future cached runs. Full Python, final lint, targeted interner, legacy/modern SPI/RX and modern ColorProfile SDK builds pass. Root review passes. Hosted verification: https://github.com/FastLED/FastLED/actions/runs/37606602152.
Issue #4707 stays open. The next batch targets optional mock/RP implementations, effects and float formatting still retained through shared units. These matching-profile measurements do not replace the reporter's PlatformIO results.
Thirteenth pass: optional mock/RP, effects and floating formatting units
The mock peripheral and RP common routers now compile independently, along with UART waveform encoding, palette/fill effects and floating formatting. Existing public APIs, platform guards, initialization order and implementation behavior are preserved. Explicit users retain the complete implementations.
Legacy saves another 2,392 B; static DRAM remains 17,648 B. The controlled gap to the working 3.10.3 RMT build is 54,304 B flash / 376 B static DRAM. Extra FastLED unwind tables contribute 29,232 B (53.8%) of that gap; exceptions remain enabled. The 3.10.6 control retains its previously documented capability-selection fallback and is not a valid real-RMT4 size comparison.
The legacy ColorProfile example exposed one additional GCC 8 IRAM literal-placement error. Moving the unchanged findChannelByNumber body out of the class definition, retaining IRAM/noinline/noexcept, fixes it without compiler flag changes. SPI, RX and ColorProfile compile on legacy ESP32 and modern ESP32-S3. Physical hardware has not been tested.
The test runner now executes registered cached probes after successful full builds, while preserving target and suite exclusions and freshness checks for announced relinks. All 418 native sanitizer units/examples and the separate example runner pass; 24 focused Python checks pass. Full Python passed 1,779 tests after the review fixes. Lint and code review pass.
Twelfth-pass hosted ESP32-S3 measured 356,091 B: https://github.com/FastLED/FastLED/actions/runs/37606602152. Its gate failed because the measured 136 B saving had to be claimed; the baseline now pins that actual result without headroom. Thirteenth-pass hosted verification passed at 356,087 B: https://github.com/FastLED/FastLED/actions/runs/37609021383.
Issue #4707 remains open. Unused Teensy engine constructors still retain mock factories in the legacy map; these and optional system/task leaves are the next measured targets. These controlled measurements are separate from the reporter PlatformIO figures.
Fourteenth pass: unused engines/system/task leaves and bounded RMT4 state
Published in PR #4736 at
0812f1725f.Teensy engines, system serial/diagnostics, executor runners and generic cooperative coroutine contexts now compile independently. ESP32 runtime yielding, scheduler pump ordering, singleton identity and implementation bodies are preserved. RMT4 physical channel state now uses a fixed-capacity vector guarded by the existing hardware-capacity check. Logical strip queues remain dynamic and retain time multiplexing.
Legacy saves another 5,236 B flash and 40 B static RAM (17,608 B). The same-toolchain gap to 3.10.3 is now 49,068 B flash / 336 B static RAM. FastLED unwind tables are 36,992 B, versus 12,536 B in the old control: 24,456 B (49.8%) of the remaining gap. Exception support is preserved; unused mock factories no longer appear in the legacy Blink image. Modern S3 costs 4 B in this layout; the table includes that cost.
All 418 native sanitizer units/examples pass. Existing SPI, RX and ColorProfile sketches compile on legacy ESP32 and modern S3. Lint and review pass. Full Python passed all 1,779 tests during this batch. Native RMT4 tests exercise the peripheral mock; physical RMT4 multiplexing has not been tested on device.
Hosted fourteenth-pass image_flash measured 356,091 B, matching the measured 4 B S3 layout cost: https://github.com/FastLED/FastLED/actions/runs/37610187849. Its gate correctly rejected the 4 B overage; the baseline now pins the actual result without headroom.
Issue #4707 remains open. Optional string operations and unused coroutine task creation still contribute frames through required core compilation units; these are the next measured candidates.
Fifteenth pass: string operations and optional coroutine task creation
Published in PR #4736 at
45106bb223. Fifty-three string search/edit/compare methods plus bitset and IEEE754 formatting now link independently. Coroutine frontend and ESP32 task creation/resource ownership are separated from required timer tasks and OS yielding. One shared private task interface and the same single ID generator preserve identity across both task kinds. Public headers/APIs and implementation behavior are preserved.Legacy saves another 2,116 B flash, with static DRAM unchanged at 17,608 B. The controlled gap to the working 3.10.3 RMT build is now 46,952 B flash / 336 B static DRAM. FastLED unwind tables measure 34,908 B, versus 12,536 B in the old control: 22,372 B (47.6%) of the remaining gap. Exceptions and RMT4 are preserved. These controls do not reproduce the reporter PlatformIO setup exactly.
All 418 native sanitizer units/examples and the separate example runner pass. Full Python passes 1,779 tests; lint and review pass. SPI, RX and ColorProfile compile on legacy ESP32 and modern S3. Modern S3 AutoResearch also compiles and retains the extracted coroutine frontend/backend factories in its map, proving explicit production users still link the feature. AutoResearch is filtered out on legacy ESP32, so it is not claimed as legacy validation. No on-device tests performed.
Hosted fifteenth-pass verification passed at 356,067 B: https://github.com/FastLED/FastLED/actions/runs/37611652044. Issue #4707 remains open. Remaining modern growth includes required channel dispatch, runtime configuration, PWM/GPIO cleanup and network reconfiguration support; no further large idle initializer was found in that matching modern comparison. The final unused-root audit and full platform validation are still outstanding.
Sixteenth pass: optional math, mapping and graphics operations
Published in PR #4736 at
b4d961243e. Math mapping/transforms, graphics pipeline operations, HSV16 conversion and optional CRGB operations now link independently. Public APIs and implementation bodies remain unchanged.Legacy saves another 1,060 B. Static DRAM remains 17,608 B. The controlled gap to 3.10.3 is 45,892 B flash / 336 B static DRAM. Extra FastLED unwind tables account for 21,312 B of the flash gap; exception support remains enabled. Modern Blink is 16,810 B above its matching 3.10.3 control. These measurements do not reproduce the reporter's PlatformIO setup exactly.
The remaining legacy static RAM difference is accounted for: SDK allocation diagnostic strings +193 B; sketch/controller state +123 B; net FastLED globals +23 B; alignment -3 B. Required runtime configuration, driver cleanup and shared scheduling remain enabled.
All 418 native sanitizer units/examples and the separate example runner pass, as do lint and code review. SPI, RX and ColorProfile compile on legacy ESP32 and modern S3; modern AutoResearch also compiles. The full local Python run exposed old graphics source-path guards after the move (1,777 tests passed). Those guards were updated to follow the new source location while preserving public-header checks; all 14 focused tests and 508 subtests pass. The complete Python suite is included in hosted validation. No physical hardware testing performed.
All 97 full-validation workflows were dispatched on exact SHA
b4d961243ecf541c0b4e12fccf9dfe4701eef07b, including Windows, both hosted macOS architectures, board builds, emulators and size gates. Validation is in progress; it is not yet a full pass. Hosted ESP32-S3 measurement: https://github.com/FastLED/FastLED/actions/runs/37613540564.Issue #4707 remains open. The changes are proposed in PR #4736 and have not been merged.
Seventeenth pass: full-sweep compatibility fixes
Published at
2ea68ea05d527d6a6f61e32606a9f74d6234a7bd. The first 97-workflow sweep completed with 38 successes and 59 failures. All failures were classified: 40 atomic dependency errors, 13 Teensy singleton dependency errors, two lint failures, and one each for IDF3 capability headers, Windows linking, WASM alignment, and ATmega8A flash overflow. This was not a full CI pass.Independent units now include their direct dependencies; thread configuration detects the platform before choosing atomic/thread-local layouts, eliminating a cross-unit layout mismatch. IDF3 capability includes are version guarded. AST lint counts each source declaration once across units while retaining distinct declarations on different lines. Existing lint path/marker exceptions and two misplaced timer-task baseline entries were corrected. Windows Meson still enables ASan/UBSan and the shared runtime explicitly; automatic launcher flag injection is suppressed on Windows, pending hosted confirmation.
RGBW output configuration no longer retains an unused full power conversion. Declaring a white power model installs it; controller opt-in, setter order, model reconfiguration and warning/fallback behavior remain intact. Both formerly overflowing ATmega8A examples build: RGBW 7,910 B and RGBWEmulated 7,620 B, each saving 1,182 B against the matching failing control.
ESP32 measurements remain unchanged: verified RMT4 Blink 308,649 B flash / 17,608 B static DRAM; local S3 Blink 356,051 B. Sixteenth-pass hosted S3 verification passed at 356,067 B, matching the baseline: https://github.com/FastLED/FastLED/actions/runs/37613540564.
Native sanitizer inventory passed 418/418 before the last power change; the final power suite also passes under sanitizers. Full local Python passes 1,784 tests and 3,273 subtests. Final lint and independent review pass. IDF3 Blink, Metro M4 and Teensy41 Blink/APA102, legacy SPI/RX/ColorProfile and modern S3 AutoResearch build successfully. The earlier claimed sixteenth-pass lint success was incorrect: the terminal completion banner followed violations; those violations are now fixed and the final lint exit status is zero.
WASM compiles locally. Local browser verification cannot create WebGL2 even with software-rendering flags, so it does not establish rendering success. Windows linking and WASM rendering require hosted confirmation. All 97 workflows have been dispatched again on the exact seventeenth-pass SHA. Issue #4707 remains open; PR #4736 is unmerged.
Final seventeenth-pass modern ESP32 Blink measures 304,499 B, unchanged. The supplied gist measures 297,383 B / 25,972 B static DRAM, a measured 32 B flash / 8 B static DRAM increase versus the sixteenth pass; these costs are included in the result.
Eighteenth pass: WASM storage alignment and Windows dependency follow-up
Published at
ae23e18bf1. The seventeenth-pass exact-SHA sweep finished with 94 successes and three failures: WASM rendering and the two Windows link workflows. Final seventeenth-pass native sanitizer validation also passed all 418 units/examples. Hosted S3 measurement passed at 356,067 B: https://github.com/FastLED/FastLED/actions/runs/37615866406.WASM singleton storage used an alignment macro that expanded to nothing, despite containing naturally aligned mutexes and atomics. Restoring
alignasfixes that storage contract. The regression fails with the old header (storage alignment 1 versus required 8) and passes with the fix; all four focused Python cases, lint, independent review and local WASM build pass. The unchanged browser checker renders five frames successfully using a local headless software-rendering environment. Hosted WASM validation is running: https://github.com/FastLED/FastLED/actions/runs/37619048183. The existing workflow now retains build diagnostics on failure.The Windows launcher experiment did not fix the failure and has been reverted. The actual failure is an ELF-only
--allow-shlib-undefinedflag reaching the COFF linker. A narrowly scoped MinGW bridge fix is proposed in the dependency PR forge-ci/reld#220, with local tests passing and native Windows acceptance running. FastLED still uses the published dependency pin; neither dependency integration nor full final-SHA validation is complete.Issue #4707 remains open. Both PRs are unmerged; no physical hardware validation has been performed.
Hosted eighteenth-pass WASM validation passed, including browser rendering and asset acceptance: https://github.com/FastLED/FastLED/actions/runs/37619048183. The external Windows candidate acceptance failed because its test invoked GNU arguments through the artifact's MSVC-named alias; the fixture is being corrected before FastLED candidate integration. This does not establish Windows integration success.
All 97 required workflows are now present for exact eighteenth-pass SHA
ae23e18bf102a8b450e339c3fed0855a94486923: WASM has passed and the remaining workflows are running/queued. This is not yet a full validation pass.Nineteenth pass: shared string append and optional semaphore isolation
Published at
19c53ff4fe. The three allocating string-append paths now share one implementation; unique-buffer growth, self-append, non-owning views and copy-on-write semantics are preserved. ESP32 binary semaphore instantiations are separated from the five other supported count limits, retaining their public linkage and all existing timed overloads. Exceptions and ISR wake/yield behavior remain enabled.Controlled legacy RMT4 Blink is now 307,373 B flash / 17,608 B static DRAM, saving 1,276 B versus the seventeenth pass (468 B from string append and 808 B from semaphore isolation). The remaining gap to 3.10.3 is 44,616 B flash / 336 B static DRAM. Current FastLED exception frames total 32,980 B, compared with 12,536 B in the old control. Modern ESP32 Blink/gist remain 304,499 / 297,383 B; local S3 Blink is 355,563 B. Hosted size verification is running: https://github.com/FastLED/FastLED/actions/runs/37622067492.
All 418 native sanitizer units/examples pass. The additional non-terminated overlapping-view regression passes under sanitizers; lint, source inventory (three tests/five subtests), and independent review pass. A copy of existing Blink using counting_semaphore<2> compiles and links against the real legacy ESP32 SDK, proving the optional implementation is still available (compile/link evidence only).
The validated dependency candidate also passes FastLED's full Windows native inventory (323 unit targets) and CompileTests examples, with ASan/UBSan retained: https://github.com/FastLED/FastLED/actions/runs/37620451677 and https://github.com/FastLED/FastLED/actions/runs/37620456545. These are explicitly marked diagnostic runs on a separate branch using an immutable, verified artifact; the published FastLED dependency pin is unchanged. Depends on forge-ci/reld#220; that fix must land and receive a published release before the ordinary pinned Windows builds can pass.
Several eighteenth-pass board jobs encountered a Tomli release upload race before compilation; the missing compatible files are now published and those jobs were rerun. Full final-source validation remains incomplete. Issue #4707 is open; PR #4736 remains unmerged.
Twentieth pass: remove unused graphics archive dependencies
Published at
ad9c679478. RGBW/RGBWW conversion and FluxScalar now have independent compilation units. Two CRGB scaling delegates and three Tile2x2 formatting methods retain their existing bodies in the graphics unit. This removes the unused parent graphics unit from the legacy Blink link without removing public APIs or disabling exceptions.Controlled legacy RMT4 Blink measures 304,049 B flash / 17,608 B static DRAM, saving another 3,324 B versus the nineteenth pass. The gap to the matching 3.10.3 control remains 41,292 B flash / 336 B static DRAM. FastLED exception frames measure 29,660 B versus 12,536 B in the old control; the extra 17,124 B explains about 41.5% of the remaining flash gap. Modern Blink/gist measure 304,503 / 297,395 B, increases of 4 / 12 B versus the nineteenth pass. Local S3 remains 355,563 B. These controlled profiles do not reproduce the reporter's PlatformIO environment exactly.
Validation: 418/418 native sanitizer units/examples pass; full Python passes 1,785 tests and 3,285 subtests (25 skipped, two expected failures); lint and independent code review pass. Four source-path guards were updated after their initial failures; their assertions and real ARM code-generation fixtures remain intact. Legacy ESP32 and S3 RGBW, RGBWEmulated and ColorProfile compile, as do Blink and the supplied gist. No physical hardware testing performed.
The eighteenth-pass full sweep finished with 95 successful workflows and two Windows failures caused by the published linker dependency. The fixed candidate passed the full Windows units/examples with sanitizers, as documented above. Release preparation is forge-ci/reld#221, alongside fix forge-ci/reld#220; dependency release publication awaits approval. FastLED still has its genuine published dependency pin.
Nineteenth-pass hosted S3 measured 355,579 B: https://github.com/FastLED/FastLED/actions/runs/37622067492. Its exact-size gate failed because the measured image was 488 B below the previous baseline. This pass records that measured baseline; twentieth-pass hosted verification and full final-source validation remain pending. Issue #4707 remains open; PR #4736 is unmerged.
Hosted twentieth-pass ESP32-S3 verification passed on exact SHA
ad9c6794781db5e3bc332aaef2aa1cba93349cbb, measuring 355,579 B against the recorded baseline: https://github.com/FastLED/FastLED/actions/runs/37626100644. The complete final-source CI sweep remains pending.Twenty-first pass: independent ESP32 audio helpers
Published at
797cc2c2a4. ESP32 audio helpers now link independently from LED drivers, with public declarations and implementation bodies unchanged. Controlled legacy RMT4 Blink measures 303,993 B flash / 17,608 B static DRAM, saving 56 B versus pass twenty. The matching 3.10.3 gap remains 41,236 B flash / 336 B static DRAM. Modern Blink measures 304,507 B (+4 B); local S3 is 355,559 B (-4 B). Hosted verification is pending; the baseline still records the actual hosted twentieth-pass measurement.All 418 native sanitizer unit/example targets pass. Lint, independent review and three source-inventory tests pass. An existing Blink copy calling both SoundUtil methods compiles and links against the real legacy ESP32 SDK, demonstrating that the optional methods remain available. No physical hardware validation performed.
A proposed RMT4 in-place channel-state optimization was rejected: removing a published slot after SDK configuration failure changes its interaction with unlocked ISR traversal. Existing channel publication, queue capacity and driver behavior remain intact. Further math archive isolation is being investigated; no additional saving is claimed yet. The external linker release approval and full final-source CI validation remain pending. Issue #4707 stays open; PR #4736 is unmerged.
Twenty-second pass: scalar math providers and XYMap formatting
Published at
b3451dbd75. Existing scalar math functions now have an independent compilation unit. The unchanged XYMap string formatter moves into mapping utilities, removing the unused STL-to-mapping archive dependency. Public headers, math algorithms, libm/fallback selection, runtime power scaling configuration and exception support are preserved.Controlled legacy RMT4 Blink measures 302,485 B flash / 17,608 B static DRAM, saving another 1,508 B versus pass twenty-one. The matching 3.10.3 gap remains 39,728 B flash / 336 B static DRAM. FastLED exception frames are 28,092 B versus 12,536 B in the old control; extra frames explain about 39.2% of the remaining flash gap. The scalar provider remains linked for required power/lround operations, while the unused parent mapping unit is omitted.
Modern Blink/gist remain 304,507 / 297,399 B, unchanged from pass twenty-one. Local S3 remains 355,559 B. Hosted pass twenty-one passed at 355,575 B: https://github.com/FastLED/FastLED/actions/runs/37627443522; the baseline now records that exact measurement. Hosted pass twenty-two verification is pending.
All 418 native sanitizer unit/example targets, lint, independent code review and 30 focused Python inventory/size-gate checks pass. Blink, RGBW, RGBWEmulated and ColorProfile compile on legacy ESP32 and S3; modern Blink and the supplied gist compile. No physical hardware tests performed. Full final-source CI remains pending, as does approval to publish the tested Windows linker dependency in its separate repository. Issue #4707 stays open; PR #4736 is unmerged.
Twenty-third pass: independent async logging
Published at
9102a03097. Existing async queue/logger implementations now link independently from synchronous logging. Public APIs, four queue instantiations, lazy registry identity, service registration, timer methods and implementation bodies are preserved.Controlled legacy RMT4 Blink measures 300,409 B flash / 17,608 B static DRAM, saving 2,076 B versus pass twenty-two. The remaining matching 3.10.3 gap is 37,652 B flash / 336 B static DRAM. FastLED exception frames are 26,008 B versus 12,536 B in the old control; extra frames account for about 35.8% of the remaining flash gap. Synchronous logging stays enabled; only unused async implementation metadata is omitted.
Modern Blink/gist remain 304,507 / 297,399 B. Local S3 measures 355,571 B, a measured 12 B increase versus pass twenty-two. Hosted twenty-second-pass verification passed at 355,575 B: https://github.com/FastLED/FastLED/actions/runs/37628420386. Hosted pass twenty-three verification is pending; its result is not assumed from the local report.
All 418 native sanitizer unit/example targets, lint, independent review and 30 focused Python checks pass. RGBW, RGBWEmulated and ColorProfile compile on legacy ESP32 and S3; modern Blink and the supplied gist also compile. A copy of existing Blink explicitly calls main/ISR logger category accessors, push/flush, service configuration and background timer enable/disable; it compiles and links against the real legacy SDK. This establishes API linkage, not physical ISR behavior. No hardware testing performed.
The tested Windows dependency still awaits approval for its separate release publication. Full final-source CI is pending. Issue #4707 remains open; PR #4736 is unmerged.
Final source validation and measured S3 baseline
Published baseline update at
adb3ec1231ac53367caed48ed88e23641c75fd6a. Hosted pass twenty-three measured 355,587 B and failed against 355,575 B by 12 B: https://github.com/FastLED/FastLED/actions/runs/37629278386. That measured S3 cost is now recorded explicitly alongside the 2,076 B legacy saving. No further production changes were made.The final source passes all 418 native sanitizer targets and the complete local Python suite: 1,785 tests / 3,285 subtests, 25 skipped and two expected failures. Final source lint passes. A separate numeric-parsing isolation trial saved only 8 B on legacy ESP32 and was discarded; the published legacy result remains 300,409 B / 17,608 B static DRAM.
All 97 required workflows have been dispatched and verified against this exact SHA, covering the 119 required jobs. Validation is running; an initial AVR8JS failure is being investigated. This is not a full CI pass. The published Windows dependency pin is unchanged; release publication approval for the tested fix remains pending. Issue #4707 is open and PR #4736 is unmerged.
Twenty-fifth pass: semaphore header guards and final validation restart
Published at
5ef7f29fb2130a822ca75986986fa5da062c343e. The preceding sweep exposed 28 platform workflows failing on ESP32 semaphore headers included before their platform guard, plus the two known Windows linker failures. On AVR the header requires unavailable chrono; on several Arduino ARM cores its standard headers collide with min/max/abs/round macros. Both instantiation units now guard those includes. ESP32 include order and implementation bodies are unchanged; no semaphore counts, timing or ISR behavior changes.The fix passes 418/418 native sanitizer targets, lint and independent review. Real UNO Test and LPC845-BRK Blink builds pass after the hosted failures. Legacy ESP32 Blink builds and remains 300,409 B / 17,608 B static DRAM. The complete local Python suite passed 1,785 tests and 3,285 subtests before this two-guard correction; exact final-SHA Python validation is included in the restarted sweep.
Unfinished superseded jobs were cancelled (already completed jobs were retained), and all 97 required workflows / 119 required jobs were dispatched and verified again on this exact SHA. They are currently queued/running, not a full CI pass.
The Windows candidate diagnostic branch was merged with this exact production source; its only differences are the two existing workflow templates installing the verified immutable dependency artifact. Fresh diagnostic validation is running: units https://github.com/FastLED/FastLED/actions/runs/37633096784 and examples https://github.com/FastLED/FastLED/actions/runs/37633095962. These do not replace the published pin or establish release publication. Issue #4707 remains open; PR #4736 and the external dependency PRs are unmerged.
Verification update — source
5ef7f29fb2The exact-source full sweep now has 94 successful workflows, two Windows dependency failures, and one macOS workflow still running (97 workflows total). Both board failures caused by npm
ECONNRESETpassed when their failed jobs were rerun: Blackpill, board matrix.The source-identical diagnostic branch, differing only in the two existing Windows workflow installation steps, passed both Windows unit tests and Windows example tests using the immutable candidate linker artifact. These are diagnostic results; the production dependency remains unchanged pending release approval. This is not a claim that all production CI has passed.
Issue #4707 remains open. The controlled legacy Blink measurement remains 300,409 B flash / 17,608 B static DRAM, versus 262,757 B / 17,272 B in 3.10.3; 37,652 B flash / 336 B static DRAM remain. The reported PlatformIO sketch results are useful context but are not interchangeable with this controlled build profile.
Pass 26 — permanent unpublished RMT4 slots (
be99ac5e4f)The real IDF4 RMT driver now configures each physical channel directly in a permanent array slot. The published channel count increases only after successful configuration, and every existing scan is bounded by that count. Failure reconstructs the unpublished slot before retry; successful channels keep stable addresses. Reverse-order source-reference release preserves the former fixed vector's destruction order before the logical queues are cleared. Hardware capacity, dynamic logical queues, ISR timing/refill, logging, exceptions, runtime configuration and multiplexing remain enabled.
Controlled legacy Blink: 300,409 → 299,869 B flash (−540 B), static DRAM unchanged at 17,608 B. Relative to 3.10.3: 37,112 B flash / 336 B static DRAM remain. Modern ESP32 Blink stays 304,507 B; local ESP32-S3 stays 355,571 B, so its independently measured hosted baseline remains unchanged.
Verification: real legacy, modern and S3 SDK compilation/linking pass; lint passes; 418 native tests pass on the trial. The final destructor-order adjustment was rebuilt with the actual legacy SDK and linted. Two independent reviews checked publication, failed-configuration rollback and destruction semantics. The actual legacy link map retains the 44-byte interrupt channel lookup in IRAM and emits no ChannelState span helper symbols. Native mock tests exercise the peripheral mock, not the production RMT4 engine; physical interrupt/failure behavior has not been tested on hardware.
A fresh exact-source sweep has 97 workflows queued/running for
be99ac5e4f956e2ddd4b80e4765a88caa773c06e. The source-identical Windows diagnostic branch is updated toaf4954244e, with only its existing workflow installation steps differing; both diagnostic suites have been dispatched again. Production Windows still uses the published linker dependency until the separate release is approved and published.This remains an open regression investigation; PR #4736 is unmerged.
zackees commentedon Oct 7, 2026
Paused at maintainer request for computer restart. Optimization saved and pushed on checkpoint/esp32-flash-4707-unity at f29056f. Follow-up #4771 contains measurements, incomplete validation and resume criteria; committed agents/tasks/esp32-flash-4707-resume.md preserves restart notes. Original regression remains open.
zackees commentedon Oct 7, 2026
Tested real
FL_NO_EXCEPTand restoring the optional string implementation group to the STL unity build. The existing macro was globally a noop.Final default Blink flash versus the saved optimization checkpoint: legacy ESP32 273,173 -> 256,801 B (-16,372); modern ESP32 289,927 -> 289,975 B (+48); ESP32-S3 353,571 -> 344,763 B (-8,808). Static DRAM unchanged. These are identical Blink/profile comparisons, not a claim of complete recovery to the earlier 3.10.3 sketches.
All three board builds and targeted native debug tests passed. Global enablement is not production-ready: generic callback/construction exception contracts need auditing, and 25 lint findings remain. The controlled four-way comparison supports restoring this string unity group; it does not establish that every unity split can be removed.
Saved experiment, detailed graph/report, measurements and next steps: #4771 (comment)
#4707 remains open. The optimization is saved for resumption after the restart; no merge or release.