Skip to content

perf(channels): slim the channels framework baseline (~9-11 KB flash on ESP32) #4800

Closed

Description

@zackees

Problem

The channels framework that replaced the old per-driver controllers is the largest single block of the ESP32 regression: about 9–11.5 KB flash and about 470 B RAM per sketch, and about 5.9 KB on teensy41.

  • Manager: ChannelManager ctor/dtor/addDriver/poll/waitForReady* (about 1.6 KB).
  • Matching: can_match_detail::checkOneGroup/isClocklessTimingCompatible, IChannelDriver::canMatch (668 B on Teensy).
  • RMT engine: ChannelEngineRMTImpl including rarely-used paths: attemptAllocationRecovery 167, reconfigureForNetwork 227, destructorCleanup 276, ChannelState copy ctor 170.
  • Containers: per-type vector ops tables for ChannelState/PendingChannel/EngineEntry/DriverInfo.
  • RAM: Singleton<ChannelManager>::storage 140 plus vtables.

Proposed approach (post-release, structural)

  • Single-driver fast path: when exactly one driver can serve a sketch's controllers, skip the generic matcher.
  • Make recovery and network-reconfigure paths link-on-use (they depend on the Wi-Fi gate sub-issue).
  • Remove copy constructors from engine state that is only moved.
  • Measure each step on the dashboard.

Acceptance

  • A measurable reduction per step on esp32dev and S3 Blink, with no behavior change. ci-full plus autoresearch on RMT.

Data: https://fastled.github.io/dashboard/ (master 18669e6 vs 3.10.3, fbuild 2.5.38), symbol-level bloat reports linked from each dashboard point.

Activity

  1. added
    type: regression
    priority: low
    area: core
    on Oct 9, 2026
  2. zackees commented on Oct 9, 2026

    @zackees
    MemberAuthor

    Step 1 landed in #4812: IChannelDriver::canMatch is now non-virtual, about −950 B flash on all four esp32dev/esp32s3 dashboard sketches. Candidates checked and rejected (RMT teardown behind a virtual destructor, capability virtuals under 100 B, runtime-gated recovery paths) are listed in that PR. The rest is structural (single-driver fast path, ID-based driver names, see #4799) and stays open.

  3. zackees commented on Oct 9, 2026

    @zackees
    MemberAuthor

    Closing this pass's slimming work: #4812 (canMatch non-virtual, about −950 B per ESP32 sketch), on top of the #4801 channel-related cuts (#4803, #4807, #4808, #4810, #4820). A measured sweep found no remaining low-risk trims; what's left is functional code that needs a framework redesign, tracked post-release in #4822.

  4. moved this from Triage to Done in FastLED Trackeron Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: corepriority: lowtype: regression

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions