Skip to content

Channels: typed add<Bus>() fast path covers only WS2812; other constant chipsets still link every encoder #5162

Closed

Description

@zackees

Follow-up to #5157.

TypedChannel::factoryFor() (src/fl/channels/channel_typed.h) only fast-paths the WS2812 encoder. Every other compile-time-constant chipset falls back to the shared out-of-line EncoderAvailability::select, which links every encoder. That includes TM1812, UCS7604 and every SpiChipsetConfig (APA102, SK9822, ...).

Effect

FastLED.add<fl::Bus::X, fl::SpiChipsetConfig>(apa102Config) with a constant chipset still keeps all the SPI and clockless encoders in flash. The #5157 size cut (about 51% of typed overhead on ESP32-C6) applies only to WS2812 users.

Proposal

Add a generic constant encoderFor(chipset) seam that resolves each statically known chipset to its single encoder. Keep library-owned availability (encoder_availability.h) as the sole source of truth for FASTLED_DISABLE_* optional encoders, so no macro-dependent inline body is reintroduced (the ODR fix in #5157). Measure with bash bloat esp32c6 on APA102 and UCS7604 typed sketches.

Activity

  1. added
    sanitized
    on Nov 8, 2026
  2. moved this from Triage to Done in FastLED Trackeron Nov 22, 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

    sanitized

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions