You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could not reproduce the 2.5x jump from #4707 (741 KB) with stock examples on fbuild's Arduino core. It probably depends on features the reporter's sketch uses (for example FastLED.add(cfg), which calls enableAllDrivers() by design since #2459), or on PlatformIO's older IDF4 core. We still need the reporter's sketch.
Where the bytes went
ESP32 (+64 KB)
Log-string pool, 50.7 KB of .flash.rodata. fbuild attributes it to SlimBridgeController<...>::SlimBridgeController(). Arduino/PlatformIO builds don't define NDEBUG, so FASTLED_LOG_VERBOSITY defaults to 1 and every FL_WARN/FL_ERROR literal stays linked. Building with -DFASTLED_LOG_VERBOSITY=0 saves 37 KB.
The rest (~27 KB): the RMT5 ChannelEngineRMTImpl, ChannelManager, fl::printf formatting, esp_cache_aligned_malloc_internal, and a stray libnet80211/s_wifi_nvs (+2.9 KB).
Teensy 4.x (+42 KB RAM on plain addLeds)
ObjectFLEDDmaManager::bitdata: a fixed 38,400 B buffer in DMAMEM (RAM2), declared __attribute__((used)), so it is never garbage-collected. In 3.10.3 the Teensy 4 default was the bit-bang clockless driver, which needed no DMA buffer. ObjectFLED is now the default Bus::FLEX_IO driver, so every sketch pays for this buffer.
Other DMAMEM statics (sLpUartBuffer, sSpiBitPattern, 4 KB each) are also used, so whether they land in the image depends on LTO partitioning rather than on whether anything references them.
Slowdowns found
Host example runner: since 2943ad963d (stub controllers moved onto SlimBridgeController), every stub show() runs real bit-bang wire timing (busy-spin per bit plus a sleep for the reset pulse). ArrayOfLedArrays / MultipleStripsInOneArray (1,080 shows) hit the 20 s watchdog every time. Fixed in the linked PR: stub delayNanoseconds / delayMicroseconds honour the fast-exit delay override. Runtime went from >20 s to 1.6 s.
fl_codec takes ~13 s in quick mode, close to the 20 s runner limit, so it times out on a loaded machine (passes in debug in 4 s).
Log defaults on tiny platforms: FL_WARN / FL_ERROR / FL_INFO / FL_PRINT are already compiled out when !SKETCH_HAS_LARGE_MEMORY. Only the literal-only FL_WARN_LIT / FL_LOG_LIT remain, and the LPC845 bring-up check needs them (ci/autoresearch/phases.pywarn_ok), so the default is unchanged. On Uno Blink the difference was 4 bytes of RAM.
The stub timing fix above.
Still open (need a decision)
ESP32/Teensy are large-memory tiers, so they still ship ~37–50 KB of log strings unless NDEBUG or FASTLED_LOG_VERBOSITY=0 is set.
The ObjectFLED 38 KB fixed bitdata buffer: size it to the actual LED count, or allocate it lazily.
Drop used from Teensy DMAMEM driver statics so unused drivers' buffers can be garbage-collected.
ObjectFLED no longer calls Serial.printf, so newlib printf is not linked.
printf-style log formatting is now a compile error. All 959 call sites were converted to stream form with the same output text. fl::printf_detail is no longer linked on teensy41 or esp32dev. The RMT driver changes are log-call syntax only.
Still open: #4711 (ObjectFLED's fixed 38.4 KB double buffer; changing it needs hardware validation) and #4712 (ESP32 log-string pool default).
Activity
[-]Post-3.10.6 fixup: memory/size regressions[/-][+][meta] Post-3.10.6 fixup: memory/size regressions[/+]fix: address review on #4709 fixes
zackees commentedon Oct 6, 2026
Bloat investigation: 3.10.3 vs HEAD (3.10.6)
Method: I built the same sketches with fbuild against a
3.10.3worktree and against HEAD, then ranfbuild symbolson both ELFs and compared them.Results
FASTLED_LOG_VERBOSITY=0addLeds)I could not reproduce the 2.5x jump from #4707 (741 KB) with stock examples on fbuild's Arduino core. It probably depends on features the reporter's sketch uses (for example
FastLED.add(cfg), which callsenableAllDrivers()by design since #2459), or on PlatformIO's older IDF4 core. We still need the reporter's sketch.Where the bytes went
ESP32 (+64 KB)
.flash.rodata. fbuild attributes it toSlimBridgeController<...>::SlimBridgeController(). Arduino/PlatformIO builds don't defineNDEBUG, soFASTLED_LOG_VERBOSITYdefaults to 1 and every FL_WARN/FL_ERROR literal stays linked. Building with-DFASTLED_LOG_VERBOSITY=0saves 37 KB.ChannelEngineRMTImpl, ChannelManager,fl::printfformatting,esp_cache_aligned_malloc_internal, and a straylibnet80211/s_wifi_nvs(+2.9 KB).Teensy 4.x (+42 KB RAM on plain
addLeds)ObjectFLEDDmaManager::bitdata: a fixed 38,400 B buffer in DMAMEM (RAM2), declared__attribute__((used)), so it is never garbage-collected. In 3.10.3 the Teensy 4 default was the bit-bang clockless driver, which needed no DMA buffer. ObjectFLED is now the defaultBus::FLEX_IOdriver, so every sketch pays for this buffer.initChannelDrivers()registered FlexIO + ObjectFLED + SPI_UNIFIED on the firstChannelManager::instance()call, so even the leanTypedChannel<Bus::X>::create()path linked every driver into ITCM (RAM1). Fixed in the linked PR.DMAMEMstatics (sLpUartBuffer,sSpiBitPattern, 4 KB each) are alsoused, so whether they land in the image depends on LTO partitioning rather than on whether anything references them.Slowdowns found
2943ad963d(stub controllers moved ontoSlimBridgeController), every stubshow()runs real bit-bang wire timing (busy-spin per bit plus asleepfor the reset pulse).ArrayOfLedArrays/MultipleStripsInOneArray(1,080 shows) hit the 20 s watchdog every time. Fixed in the linked PR: stubdelayNanoseconds/delayMicrosecondshonour the fast-exit delay override. Runtime went from >20 s to 1.6 s.fl_codectakes ~13 s in quick mode, close to the 20 s runner limit, so it times out on a loaded machine (passes in debug in 4 s).Fixed in the PR
initChannelDrivers()) now registers only the platform-default ObjectFLED engine. FlexIO-1 and SPI_UNIFIED register only viaenableAllDrivers()/FastLED.add(cfg), which still enroll every driver with the same priorities.FL_WARN/FL_ERROR/FL_INFO/FL_PRINTare already compiled out when!SKETCH_HAS_LARGE_MEMORY. Only the literal-onlyFL_WARN_LIT/FL_LOG_LITremain, and the LPC845 bring-up check needs them (ci/autoresearch/phases.pywarn_ok), so the default is unchanged. On Uno Blink the difference was 4 bytes of RAM.Still open (need a decision)
NDEBUGorFASTLED_LOG_VERBOSITY=0is set.bitdatabuffer: size it to the actual LED count, or allocate it lazily.usedfrom TeensyDMAMEMdriver statics so unused drivers' buffers can be garbage-collected.fix(teensy): drop unused-driver DMA buffers and newlib printf from RAM (
perf(teensy): stream-form logs so fl::printf is not linked (#4709)
perf(teensy): convert remaining SPI/RX printf-form logs to stream form (
feat(log)!: make printf-style log formatting a compile error (#4709)
zackees commentedon Oct 6, 2026
Memory trimming update (PR #4710)
addLeds): ITCM (RAM1 code)What changed:
FL_DMAMEMlets the linker drop unused drivers' DMA buffers (Teensy 4: DMAMEM driver statics marked used survive LTO in sketches that never use the driver #4713).Serial.printf, so newlib printf is not linked.fl::printf_detailis no longer linked on teensy41 or esp32dev. The RMT driver changes are log-call syntax only.Still open: #4711 (ObjectFLED's fixed 38.4 KB double buffer; changing it needs hardware validation) and #4712 (ESP32 log-string pool default).
fix(log): address review on the printf-form ban (#4709)
fix(ci): claim ESP32-S3 bloat saving; update BLE source assertion (#4709
fix: post-3.10.6 Teensy RAM1/RAM2 trimming and host example slowdown (#…
zackees commentedon Oct 6, 2026
All five sub-issues are fixed by merged PRs that passed CI and, where the change touches hardware behavior, a run on a real Teensy 4.0.
Other bugs fixed along the way:
Still open as follow-ups: