Skip to content

fix(core): flush channel drivers on direct CLEDController::showLeds (#2371) - #2377

Merged
zackees merged 1 commit into
masterfrom
fix-2371-direct-controller-show
Apr 22, 2026
Merged

zackees merged 1 commit into
masterfrom
fix-2371-direct-controller-show

Conversation

@zackees

@zackees zackees commented Apr 22, 2026 •

Copy link
Copy Markdown
Member

Fixes #2371.

Summary

  • FastLED[0].showLeds(255) on channel-backed platforms (e.g. ESP32-S3 RMT5 / ClocklessIdf5) stopped producing output on master: the call queued encoded pixel bytes on the ChannelManager driver but never told the driver to transmit, because that flush is normally driven by the frame-end event that FastLED.show() emits.
  • Bracket CLEDController::showLeds() with EngineEvents::onBeginFrame() / onEndFrame() / onEndShowLeds(), gated on FASTLED_HAS_ENGINE_EVENTS so tiny/low-memory targets keep the lightweight inlined path with no EngineEvents/ChannelManager pulled in.
  • Piggybacked span change needed to unblock builds after picking up e713d6f9f3 (Add CRGB16 palette lookup API): delete the non-std::span single-argument explicit span(T *data) constructor on the static-extent specialization — it was ambiguous with span(T (&arr)[N]) under clang 21. The C-array constructor already handles the compile-time-sized case without a redundant runtime length, matching std::span<T, N>::span(std::type_identity_t<T>(&)[N]).

Design notes

Fixing at CLEDController::showLeds() (not Channel::showLeds()) because other channel-driver-backed controller wrappers (ESP32 RMT4, clockless-SPI paths that are CPixelLEDController subclasses rather than fl::Channel subclasses) share the same enqueue-without-flush structure — the base-class fix covers all of them.

Global batching is unaffected: FastLED.show() calls showLedsInternal() on each controller (not public showLeds()), then fires frame events once at the end.

See #2371 for the full investigation and the design-note comment.

Test plan

  • bash test --cpp fl/channels/driver.cpp — existing Channel transmission test updated to drop the manual mockEngine->show() and exercise direct channel->showLeds(255); two new test cases cover controller->showLeds(255) and controller->clearLeds() via asController(); FastLED.show() with channels simplified to assert both enqueue and transmit fire without a manual mock show().
  • bash test --cpp fl/gfx/colorutils_palette.cpp — confirms the span ambiguity fix keeps ColorFromPaletteHD instantiations working.
  • bash test --cpp fl/stl/span — span unit tests.
  • bash lint --cpp.

Related

Filed #2376 for the pre-existing #pragma once + PCH redefinition issue on Windows that shows up with bash test --cpp (full suite) for fl/cled_controller.h and fl/gfx/colorutils.h. Not in scope for this PR and reproduces on master independent of this change.

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Breaking Changes

    • fl::span static-extent constructor updated—pointer-based construction removed and replaced with array-based construction.
  • Improvements

    • LED controller now conditionally emits additional event hooks when engine events feature is enabled.
  • Tests

    • Expanded coverage for LED driver transmission, channel flushing, and buffer clearing behavior.

…wLeds

Fixes #2371.

Since the ESP32 clockless path moved onto the `ChannelManager` architecture
(`ClocklessIdf5` inherits from `fl::Channel`), `Channel::showPixels()` only
*enqueues* encoded pixel data on the channel driver; the actual hardware
flush is driven by `ChannelManager::onEndFrame()`, which `FastLED.show()`
triggers via `EngineEvents::onEndFrame()`.

The direct per-controller path (`FastLED[0].showLeds(255)` / `CLEDController::
showLeds()`) never emitted those frame events, so it queued bytes but never
told the driver to transmit — the indexed API effectively stopped producing
output on channel-backed platforms, even though `FastLED.show()` worked.

Fix: have `CLEDController::showLeds()` bracket the begin/show/end sequence
with `onBeginFrame()` and `onEndFrame()` / `onEndShowLeds()`, matching the
flush that `CFastLED::show()` already performs.  Gated on
`FASTLED_HAS_ENGINE_EVENTS` so tiny/low-memory builds keep the lightweight
inlined path (no `EngineEvents`, no `ChannelManager` pulled in).

Why here vs `Channel::showLeds()`: other channel-driver-backed controller
wrappers (ESP32 RMT4, clockless-SPI paths that are `CPixelLEDController`
subclasses rather than `fl::Channel` subclasses) have the same enqueue-
without-flush structure; fixing in the base `CLEDController` covers all of
them.

Also in this change, needed to unblock compilation after picking up master:

- `src/fl/stl/span.h`: delete the single-argument `explicit span(T *data)`
  constructor for the static-extent specialization.  It is not in
  `std::span<T, N>` and created an ambiguity against `span(T (&arr)[N])`
  for `fl::span<const CRGB, 32>(pal.entries)` in `colorutils.cpp.hpp` under
  clang 21.  The C-array constructor already provides the compile-time-sized
  case without a redundant runtime length; callers that previously used the
  pointer-only form must use the `(pointer, size)` form.

Tests in `tests/fl/channels/driver.cpp`:
  - Existing `Channel transmission` test: drop the manual
    `mockEngine->show()` and verify transmission happens via the direct
    `channel->showLeds(255)` path.
  - New `CLEDController direct showLeds flushes channel drivers`: invokes
    `controller->showLeds(255)` on the `CLEDController*` obtained via
    `asController()` and confirms both `enqueue()` and `show()` fire on the
    mock driver.
  - New `CLEDController clearLeds flushes cleared channel data`: exercises
    the clear-then-show compatibility path and confirms LEDs are zeroed
    and flushed in one call.
  - `FastLED.show() with channels`: drop the in-test debug `FL_WARN`s; assert
    directly that `FastLED.show()` both enqueues and transmits without a
    manual `mockEngine->show()`.
@coderabbitai

coderabbitai Bot commented Apr 22, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 09407eb6-c4eb-4755-8eaf-2690d84ee492

📥 Commits

Reviewing files that changed from the base of the PR and between e713d6f and 45e6cfb.

📒 Files selected for processing (3)
  • src/fl/cled_controller.h
  • src/fl/stl/span.h
  • tests/fl/channels/driver.cpp

📝 Walkthrough

Walkthrough

This pull request addresses a bug in the multiple instance interface where direct calls to CLEDController::showLeds() were not properly flushing channel drivers. Changes include adding conditional engine event hooks to the showLeds() method, adjusting the span constructor to properly handle array references, and adding tests to verify correct channel transmission behavior.

Changes

Cohort / File(s) Summary
Engine Events Integration
src/fl/cled_controller.h
Added conditional fl::EngineEvents hook calls (onBeginFrame(), onEndFrame(), onEndShowLeds()) to showLeds() method when FASTLED_HAS_ENGINE_EVENTS is enabled, ensuring proper frame lifecycle management during LED updates.
Span Constructor Update
src/fl/stl/span.h
Removed explicit pointer-only constructor span(T* data) from static-extent span specialization and modified array constructor span(T (&array)[Extent]) to align with std::span array construction semantics.
Channel Driver Tests
tests/fl/channels/driver.cpp
Extended MockEngine with showCount counter; added new tests "CLEDController direct showLeds flushes channel drivers" and "CLEDController clearLeds flushes cleared channel data" to verify proper channel transmission and LED buffer flushing; simplified existing tests by removing manual engine show calls.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Through channels deep and drivers true,
The rabbit hops to fix what's new,
With frame events now shining bright,
Each showLeds() call sets LEDs alight! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-2371-direct-controller-show

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

📊 Header Compilation Performance

Total Time: 1183.87ms

Top 5 Slowest Headers

  1. FastLED.h - 908.69ms
  2. fl/fastled.h - 392.36ms
  3. fl/task/executor.h - 295.53ms
  4. crgb.h - 225.49ms
  5. fl/gfx/crgb.h - 224.21ms

Warnings

⚠️ Header FastLED.h exceeds 150ms (908.7ms)
⚠️ Header fl/fastled.h exceeds 150ms (392.4ms)
⚠️ Header fl/task/executor.h exceeds 150ms (295.5ms)
⚠️ Header crgb.h exceeds 150ms (225.5ms)
⚠️ Header fl/gfx/crgb.h exceeds 150ms (224.2ms)
⚠️ Header fl/math/ease.h exceeds 150ms (219.3ms)
⚠️ Header fl/math/fixed_point.h exceeds 150ms (216.9ms)
⚠️ Header fl/task/scheduler.h exceeds 150ms (157.1ms)
⚠️ Header fl/stl/singleton.h exceeds 50ms (147.5ms)
⚠️ Header fl/stl/thread_local.h exceeds 50ms (146.7ms)
⚠️ Header fl/stl/thread.h exceeds 50ms (145.6ms)
⚠️ Header platforms/thread.h exceeds 50ms (145.5ms)
⚠️ Header platforms/stub/thread_stub.h exceeds 50ms (145.5ms)
⚠️ Header platforms/stub/thread_stub_stl.h exceeds 50ms (145.4ms)
⚠️ Header fl/ui.h exceeds 50ms (125.8ms)
⚠️ Header fl/task/promise.h exceeds 50ms (124.4ms)
⚠️ Header fl/stl/json.h exceeds 50ms (78.7ms)
⚠️ Header fl/stl/function.h exceeds 50ms (73.5ms)
⚠️ Header fl/math/fixed_point/s4x12.h exceeds 50ms (67.2ms)
⚠️ Header fl/stl/json/types.h exceeds 50ms (61.2ms)
⚠️ Header platforms.h exceeds 50ms (56.0ms)
⚠️ Header platforms/stub/fastled_stub.h exceeds 50ms (56.0ms)
⚠️ Template instantiation time is high (52.1%)

Full Report
================================================================================
FASTLED COMPILATION PERFORMANCE REPORT
================================================================================
Generated: 2026-04-22 16:30:50
Compiler: clang++-17
File: ci/perf/test_compile.cpp

SUMMARY
--------------------------------------------------------------------------------
Total Compilation Time:    8,873.14 ms
Frontend Time:             156.57 ms (1.8%)
Backend Time:              2,271.10 ms (25.6%)

COMPILATION PHASES
--------------------------------------------------------------------------------
Source                    36081.92 ms (406.6%)
Templates                   843.81 ms (  9.5%)

FASTLED HEADERS (Level 1 - Direct Includes)
--------------------------------------------------------------------------------
  4734.2 ms - FastLED.h (SLOW)
  3073.1 ms - fl/task/executor.h (SLOW)
  2206.4 ms - fl/task/promise.h (SLOW)
  2110.9 ms - fl/stl/function.h (SLOW)
  1362.9 ms - fl/stl/shared_ptr.h (SLOW)
  1192.6 ms - fl/stl/type_traits.h (SLOW)
   852.7 ms - fl/task/scheduler.h (SLOW)
   843.2 ms - fl/stl/singleton.h (SLOW)
   842.4 ms - fl/stl/thread_local.h (SLOW)
   841.2 ms - fl/stl/thread.h (SLOW)
   841.1 ms - platforms/thread.h (SLOW)
   841.1 ms - platforms/stub/thread_stub.h (SLOW)
   841.0 ms - platforms/stub/thread_stub_stl.h (SLOW)
   696.1 ms - fl/fastled.h (SLOW)
   682.5 ms - fl/stl/stdint.h (SLOW)
   663.8 ms - fl/stl/move.h (SLOW)
   454.4 ms - fl/stl/vector.h (SLOW)
   438.8 ms - platforms/int.h (SLOW)
   438.1 ms - platforms/shared/int.h (SLOW)
   438.0 ms - platforms/shared/int_linux.h (SLOW)

FASTLED HEADERS (Nested Includes - Up to 10 Levels)
--------------------------------------------------------------------------------
FastLED.h (4734.2ms)
  ├─ 3073.1 ms - fl/task/executor.h
  │ ├─ 2206.4 ms - fl/task/promise.h
  │ │ ├─ 2110.9 ms - fl/stl/function.h
  │ │ │ ├─ 1362.9 ms - fl/stl/shared_ptr.h
  │ │ │ │ ├─ 1192.6 ms - fl/stl/type_traits.h
  │ │ │ │ │ └─  663.8 ms - fl/stl/move.h
  │ │ │ │ ├─   47.5 ms - fl/stl/align.h
  │ │ │ │ ├─   22.3 ms - fl/stl/atomic.h
  │ │ │ │ │ └─   21.3 ms - platforms/atomic.h
  │ │ │ │ │   └─   21.2 ms - platforms/shared/atomic.h
  │ │ │ │ └─    1.3 ms - fl/stl/bit_cast.h
  │ │ │ │   └─    0.7 ms - fl/stl/cstring.h
  │ │ │ ├─  454.4 ms - fl/stl/vector.h
  │ │ │ │ ├─  281.0 ms - fl/math/math.h
  │ │ │ │ │ └─  250.1 ms - fl/stl/undef.h
  │ │ │ │ │   └─  416.0 ms - stdlib.h
  │ │ │ │ │     ├─  211.4 ms - cstdlib
  │ │ │ │ │     │ └─  416.0 ms - stdlib.h
  │ │ │ │ │     │   ├─  211.4 ms - cstdlib
  │ │ │ │ │     │   ├─   83.6 ms - types.h
  │ │ │ │ │     │   ├─    5.6 ms - floatn.h
  │ │ │ │ │     │   └─    4.9 ms - locale_t.h
  │ │ │ │ │     ├─   83.6 ms - types.h
  │ │ │ │ │     │ ├─   83.6 ms - types.h
  │ │ │ │ │     │ │ ├─   83.6 ms - types.h
  │ │ │ │ │     │ │ ├─   20.3 ms - select.h
  │ │ │ │ │     │ │ ├─   12.1 ms - pthreadtypes.h
  │ │ │ │ │     │ │ └─   11.2 ms - endian.h
  │ │ │ │ │     │ ├─   20.3 ms - select.h
  │ │ │ │ │     │ │ └─    0.8 ms - sigset_t.h
  │ │ │ │ │     │ ├─   12.1 ms - pthreadtypes.h
  │ │ │ │ │     │ │ └─   11.1 ms - thread-shared-types.h
  │ │ │ │ │     │ └─   11.2 ms - endian.h
  │ │ │ │ │     │   └─    0.5 ms - byteswap.h
  │ │ │ │ │     ├─    5.6 ms - floatn.h
  │ │ │ │ │     └─    4.9 ms - locale_t.h
  │ │ │ │ ├─  102.9 ms - fl/stl/allocator.h
  │ │ │ │ │ └─   96.8 ms - fl/stl/bitset.h
  │ │ │ │ │   └─   92.2 ms - fl/stl/bitset_dynamic.h
  │ │ │ │ │     └─    2.3 ms - fl/stl/unique_ptr.h
  │ │ │ │ │       └─    0.5 ms - fl/stl/utility.h
  │ │ │ │ ├─   25.0 ms - fl/stl/basic_vector.h
  │ │ │ │ ├─   17.6 ms - fl/stl/initializer_list.h
  │ │ │ │ └─    0.7 ms - fl/stl/functional.h
  │ │ │ ├─  205.9 ms - fl/stl/variant.h
  │ │ │ │ └─  203.4 ms - fl/stl/new.h
  │ │ │ │   └─  203.4 ms - platforms/new.h
  │ │ │ │     └─  203.3 ms - platforms/shared/new.h
  │ │ │ │       └─  166.4 ms - new
  │ │ │ │         ├─   83.0 ms - c++config.h
  │ │ │ │         │ └─   40.5 ms - os_defines.h
  │ │ │ │         └─    0.6 ms - version.h
  │ │ │ ├─   59.1 ms - fl/stl/compiler_control.h
  │ │ │ └─   19.2 ms - fl/stl/pair.h
  │ │ └─   90.3 ms - fl/stl/string.h
  │ │   ├─   54.2 ms - fl/stl/span.h
  │ │   │ └─   25.2 ms - fl/math/geometry.h
  │ │   ├─   12.9 ms - fl/stl/basic_string.h
  │ │   │ ├─    1.0 ms - fl/stl/not_null.h
  │ │   │ ├─    0.9 ms - fl/stl/iterator.h
  │ │   │ └─    0.5 ms - fl/stl/charconv.h
  │ │   ├─    5.7 ms - fl/stl/string_view.h
  │ │   └─    1.9 ms - fl/stl/optional.h
  │ ├─  852.7 ms - fl/task/scheduler.h
  │ │ ├─  843.2 ms - fl/stl/singleton.h
  │ │ │ └─  842.4 ms - fl/stl/thread_local.h
  │ │ │   └─  841.2 ms - fl/stl/thread.h
  │ │ │     └─  841.1 ms - platforms/thread.h
  │ │ │       └─  841.1 ms - platforms/stub/thread_stub.h
  │ │ │         └─  841.0 ms - platforms/stub/thread_stub_stl.h
  │ │ │           └─  821.7 ms - thread
  │ │ │             ├─  508.1 ms - std_thread.h
  │ │ │             └─  254.5 ms - this_thread_sleep.h
  │ │ └─    8.7 ms - fl/task/task.h
  │ │   └─    3.5 ms - fl/trace.h
  │ │     ├─    2.2 ms - fl/stl/chrono.h
  │ │     └─    1.0 ms - fl/stl/tuple.h
  │ ├─   11.6 ms - platforms/await.h
  │ │ └─   11.2 ms - platforms/coroutine_runtime.h
  │ │   └─    9.6 ms - fl/system/engine_events.h
  │ │     ├─    5.0 ms - fl/math/screenmap.h
  │ │     │ └─    3.7 ms - fl/stl/flat_map.h
  │ │     └─    3.1 ms - fl/math/xymap.h
  │ │       └─    0.8 ms - fl/math/lut.h
  │ └─    0.8 ms - fl/task/promise_result.h
  ├─  696.1 ms - fl/fastled.h
  │ ├─  353.6 ms - crgb.h
  │ │ ├─  352.3 ms - fl/gfx/crgb.h
  │ │ │ └─  347.3 ms - fl/math/ease.h
  │ │ │   └─  344.9 ms - fl/math/fixed_point.h
  │ │ │     ├─  197.1 ms - fl/math/fixed_point/s4x12.h
  │ │ │     │ ├─  176.4 ms - fl/math/sin32.h
  │ │ │     │ │ └─  173.2 ms - fl/math/simd.h
  │ │ │     │ │   └─  172.6 ms - fl/math/simd/types.h
  │ │ │     │ │     └─  172.3 ms - platforms/simd.h
  │ │ │     │ ├─    1.0 ms - fl/math/fixed_point/traits.h
  │ │ │     │ └─    0.8 ms - fl/math/fixed_point/isqrt.h
  │ │ │     ├─   18.7 ms - fl/math/fixed_point/s16x16.h
  │ │ │     ├─   18.5 ms - fl/math/fixed_point/s8x8.h
  │ │ │     ├─   18.4 ms - fl/math/fixed_point/s8x24.h
  │ │ │     └─   18.2 ms - fl/math/fixed_point/s24x8.h
  │ │ └─    0.9 ms - chsv.h
  │ │   └─    0.7 ms - fl/gfx/hsv.h
  │ ├─  169.8 ms - platforms.h
  │ │ └─  169.7 ms - platforms/stub/fastled_stub.h
  │ │   ├─  132.4 ms - platforms/stub/fastspi_stub.h
  │ │   │ └─  132.4 ms - platforms/stub/fastspi_stub_generic.h
  │ │   │   ├─  125.9 ms - platforms/shared/active_strip_data/active_strip_data.h
  │ │   │   │ └─  123.7 ms - fl/id_tracker.h
  │ │   │   │   └─  122.6 ms - fl/stl/mutex.h
  │ │   │   │     └─  122.5 ms - platforms/mutex.h
  │ │   │   │       └─  122.4 ms - platforms/stub/mutex_stub.h
  │ │   │   └─    6.1 ms - platforms/shared/active_strip_tracker/active_strip_tracker.h
  │ │   └─   37.2 ms - platforms/stub/clockless_stub.h
  │ │     └─   37.2 ms - platforms/stub/clockless_channel_stub.h
  │ │       ├─   13.3 ms - fl/channels/data.h
  │ │       │ └─    9.9 ms - fl/channels/config.h
  │ │       │   ├─    2.2 ms - fl/chipsets/chipset_timing_config.h
  │ │       │   │ └─    1.4 ms - fl/chipsets/led_timing.h
  │ │       │   └─    1.7 ms - fl/chipsets/spi.h
  │ │       ├─   13.2 ms - fl/system/log.h
  │ │       │ └─   12.8 ms - fl/stl/strstream.h
  │ │       ├─    2.4 ms - fl/channels/manager.h
  │ │       ├─    1.6 ms - fl/stl/weak_ptr.h
  │ │       └─    1.1 ms - fl/channels/driver.h
  │ ├─   65.8 ms - pixeltypes.h
  │ │ ├─   62.1 ms - lib8tion.h
  │ │ │ ├─   52.8 ms - fl/math/math8.h
  │ │ │ │ ├─   45.4 ms - fl/math/scale8.h
  │ │ │ │ │ └─   45.3 ms - platforms/scale8.h
  │ │ │ │ │   └─   43.7 ms - platforms/shared/scale8.h
  │ │ │ │ ├─    5.3 ms - fl/math/intmap.h
  │ │ │ │ │ └─    4.1 ms - platforms/intmap.h
  │ │ │ │ └─    2.1 ms - platforms/math8.h
  │ │ │ │   └─    1.7 ms - platforms/shared/math8.h
  │ │ │ ├─    2.0 ms - fl/math/beat.h
  │ │ │ │ └─    1.1 ms - fl/math/trig8.h
  │ │ │ │   └─    1.0 ms - platforms/trig8.h
  │ │ │ │     └─    0.9 ms - platforms/shared/trig8.h
  │ │ │ └─    0.5 ms - fl/math/qfx.h
  │ │ └─    3.3 ms - crgb.hpp
  │ ├─   42.9 ms - colorutils.h
  │ │ └─   42.5 ms - fl/gfx/colorutils.h
  │ │   ├─    8.9 ms - fl/gfx/blur.h
  │ │   │ └─    4.7 ms - fl/gfx/canvas.h
  │ │   │   └─    2.9 ms - fl/math/alpha.h
  │ │   ├─    3.2 ms - fl/gfx/fill.h
  │ │   └─    1.8 ms - fl/gfx/crgb16.h
  │ └─   23.8 ms - pixel_controller.h
  │   ├─   17.2 ms - pixel_iterator.h
  │   │ └─   17.1 ms - fl/chipsets/encoders/pixel_iterator.h
  │   │   ├─    5.2 ms - fl/chipsets/encoders/apa102.h
  │   │   │ └─    4.0 ms - fl/chipsets/encoders/encoder_utils.h
  │   │   │   └─    3.3 ms - fl/gfx/gamma_lut.h
  │   │   ├─    4.5 ms - fl/chipsets/encoders/pixel_iterator_adapters.h
  │   │   ├─    1.0 ms - fl/chipsets/encoders/sk9822.h
  │   │   └─    0.9 ms - fl/chipsets/encoders/hd108.h
  │   └─    2.6 ms - rgbw.h
  │     └─    2.4 ms - fl/gfx/rgbw.h
  ├─  682.5 ms - fl/stl/stdint.h
  │ └─  438.8 ms - platforms/int.h
  │   ├─  438.1 ms - platforms/shared/int.h
  │   │ └─  438.0 ms - platforms/shared/int_linux.h
  │   └─    0.7 ms - platforms/arm/is_arm.h
  ├─  162.0 ms - fl/ui.h
  │ ├─   76.5 ms - fl/stl/json.h
  │ │ └─   59.4 ms - fl/stl/json/types.h
  │ │   └─    7.6 ms - fl/stl/limits.h
  │ ├─   10.1 ms - fl/asset.h
  │ │ └─    8.5 ms - fl/stl/url.h
  │ └─   10.1 ms - fl/ui_impl.h
  │   └─    9.5 ms - platforms/ui_defs.h
  │     ├─    2.1 ms - platforms/shared/ui/json/audio.h
  │     │ └─    1.0 ms - platforms/shared/ui/json/audio_internal.h
  │     ├─    1.6 ms - platforms/shared/ui/json/button.h
  │     │ └─    0.7 ms - platforms/shared/ui/json/ui_internal.h
  │     ├─    0.9 ms - platforms/shared/ui/json/help.h
  │     ├─    0.8 ms - platforms/shared/ui/json/number_field.h
  │     └─    0.8 ms - platforms/shared/ui/json/description.h
  └─   28.6 ms - chipsets.h
    ├─   11.6 ms - fl/chipsets/ucs7604.h
    │ └─    8.7 ms - fl/chipsets/encoders/ucs7604.h
    ├─    7.0 ms - fl/chipsets/apa102.h
    ├─    1.7 ms - fl/chipsets/lpd880x.h
    ├─    0.9 ms - fl/chipsets/p9813.h
    └─    0.8 ms - fl/chipsets/encoders/ws2816.h
fl/task/executor.h (3073.1ms)
  ├─ 2206.4 ms - fl/task/promise.h
  │ ├─ 2110.9 ms - fl/stl/function.h
  │ │ ├─ 1362.9 ms - fl/stl/shared_ptr.h
  │ │ │ ├─ 1192.6 ms - fl/stl/type_traits.h
  │ │ │ │ └─  663.8 ms - fl/stl/move.h
  │ │ │ ├─   47.5 ms - fl/stl/align.h
  │ │ │ ├─   22.3 ms - fl/stl/atomic.h
  │ │ │ │ └─   21.3 ms - platforms/atomic.h
  │ │ │ │   └─   21.2 ms - platforms/shared/atomic.h
  │ │ │ └─    1.3 ms - fl/stl/bit_cast.h
  │ │ │   └─    0.7 ms - fl/stl/cstring.h
  │ │ ├─  454.4 ms - fl/stl/vector.h
  │ │ │ ├─  281.0 ms - fl/math/math.h
  │ │ │ │ └─  250.1 ms - fl/stl/undef.h
  │ │ │ │   └─  416.0 ms - stdlib.h
  │ │ │ │     ├─  211.4 ms - cstdlib
  │ │ │ │     │ └─  416.0 ms - stdlib.h
  │ │ │ │     │   ├─  211.4 ms - cstdlib
  │ │ │ │     │   │ └─  416.0 ms - stdlib.h
  │ │ │ │     │   ├─   83.6 ms - types.h
  │ │ │ │     │   │ ├─   83.6 ms - types.h
  │ │ │ │     │   │ ├─   20.3 ms - select.h
  │ │ │ │     │   │ ├─   12.1 ms - pthreadtypes.h
  │ │ │ │     │   │ └─   11.2 ms - endian.h
  │ │ │ │     │   ├─    5.6 ms - floatn.h
  │ │ │ │     │   └─    4.9 ms - locale_t.h
  │ │ │ │     ├─   83.6 ms - types.h
  │ │ │ │     │ ├─   83.6 ms - types.h
  │ │ │ │     │ │ ├─   83.6 ms - types.h
  │ │ │ │     │ │ │ ├─   83.6 ms - types.h
  │ │ │ │     │ │ │ ├─   20.3 ms - select.h
  │ │ │ │     │ │ │ ├─   12.1 ms - pthreadtypes.h
  │ │ │ │     │ │ │ └─   11.2 ms - endian.h
  │ │ │ │     │ │ ├─   20.3 ms - select.h
  │ │ │ │     │ │ │ └─    0.8 ms - sigset_t.h
  │ │ │ │     │ │ ├─   12.1 ms - pthreadtypes.h
  │ │ │ │     │ │ │ └─   11.1 ms - thread-shared-types.h
  │ │ │ │     │ │ └─   11.2 ms - endian.h
  │ │ │ │     │ │   └─    0.5 ms - byteswap.h
  │ │ │ │     │ ├─   20.3 ms - select.h
  │ │ │ │     │ │ └─    0.8 ms - sigset_t.h
  │ │ │ │     │ ├─   12.1 ms - pthreadtypes.h
  │ │ │ │     │ │ └─   11.1 ms - thread-shared-types.h
  │ │ │ │     │ └─   11.2 ms - endian.h
  │ │ │ │     │   └─    0.5 ms - byteswap.h
  │ │ │ │     ├─    5.6 ms - floatn.h
  │ │ │ │     └─    4.9 ms - locale_t.h
  │ │ │ ├─  102.9 ms - fl/stl/allocator.h
  │ │ │ │ └─   96.8 ms - fl/stl/bitset.h
  │ │ │ │   └─   92.2 ms - fl/stl/bitset_dynamic.h
  │ │ │ │     └─    2.3 ms - fl/stl/unique_ptr.h
  │ │ │ │       └─    0.5 ms - fl/stl/utility.h
  │ │ │ ├─   25.0 ms - fl/stl/basic_vector.h
  │ │ │ ├─   17.6 ms - fl/stl/initializer_list.h
  │ │ │ └─    0.7 ms - fl/stl/functional.h
  │ │ ├─  205.9 ms - fl/stl/variant.h
  │ │ │ └─  203.4 ms - fl/stl/new.h
  │ │ │   └─  203.4 ms - platforms/new.h
  │ │ │     └─  203.3 ms - platforms/shared/new.h
  │ │ │       └─  166.4 ms - new
  │ │ │         ├─   83.0 ms - c++config.h
  │ │ │         │ └─   40.5 ms - os_defines.h
  │ │ │         │   └─   35.3 ms - features.h
  │ │ │         └─    0.6 ms - version.h
  │ │ ├─   59.1 ms - fl/stl/compiler_control.h
  │ │ └─   19.2 ms - fl/stl/pair.h
  │ └─   90.3 ms - fl/stl/string.h
  │   ├─   54.2 ms - fl/stl/span.h
  │   │ └─   25.2 ms - fl/math/geometry.h
  │   ├─   12.9 ms - fl/stl/basic_string.h
  │   │ ├─    1.0 ms - fl/stl/not_null.h
  │   │ ├─    0.9 ms - fl/stl/iterator.h
  │   │ └─    0.5 ms - fl/stl/charconv.h
  │   ├─    5.7 ms - fl/stl/string_view.h
  │   └─    1.9 ms - fl/stl/optional.h
  ├─  852.7 ms - fl/task/scheduler.h
  │ ├─  843.2 ms - fl/stl/singleton.h
  │ │ └─  842.4 ms - fl/stl/thread_local.h
  │ │   └─  841.2 ms - fl/stl/thread.h
  │ │     └─  841.1 ms - platforms/thread.h
  │ │       └─  841.1 ms - platforms/stub/thread_stub.h
  │ │         └─  841.0 ms - platforms/stub/thread_stub_stl.h
  │ │           └─  821.7 ms - thread
  │ │             ├─  508.1 ms - std_thread.h
  │ │             │ ├─  132.9 ms - tuple
  │ │             │ ├─   89.8 ms - iosfwd
  │ │             │ ├─   52.0 ms - gthr.h
  │ │             │ ├─   47.7 ms - refwrap.h
  │ │             │ └─   41.1 ms - unique_ptr.h
  │ │             └─  254.5 ms - this_thread_sleep.h
  │ │               ├─  191.4 ms - chrono.h
  │ │               └─   25.8 ms - cerrno
  │ └─    8.7 ms - fl/task/task.h
  │   └─    3.5 ms - fl/trace.h
  │     ├─    2.2 ms - fl/stl/chrono.h
  │     └─    1.0 ms - fl/stl/tuple.h
  ├─   11.6 ms - platforms/await.h
  │ └─   11.2 ms - platforms/coroutine_runtime.h
  │   └─    9.6 ms - fl/system/engine_events.h
  │     ├─    5.0 ms - fl/math/screenmap.h
  │     │ └─    3.7 ms - fl/stl/flat_map.h
  │     └─    3.1 ms - fl/math/xymap.h
  │       └─    0.8 ms - fl/math/lut.h
  └─    0.8 ms - fl/task/promise_result.h
fl/fastled.h (696.1ms)
  ├─  353.6 ms - crgb.h
  │ ├─  352.3 ms - fl/gfx/crgb.h
  │ │ └─  347.3 ms - fl/math/ease.h
  │ │   └─  344.9 ms - fl/math/fixed_point.h
  │ │     ├─  197.1 ms - fl/math/fixed_point/s4x12.h
  │ │     │ ├─  176.4 ms - fl/math/sin32.h
  │ │     │ │ └─  173.2 ms - fl/math/simd.h
  │ │     │ │   └─  172.6 ms - fl/math/simd/types.h
  │ │     │ │     └─  172.3 ms - platforms/simd.h
  │ │     │ │       └─  172.3 ms - platforms/shared/simd_x86.hpp
  │ │     │ ├─    1.0 ms - fl/math/fixed_point/traits.h
  │ │     │ └─    0.8 ms - fl/math/fixed_point/isqrt.h
  │ │     ├─   18.7 ms - fl/math/fixed_point/s16x16.h
  │ │     ├─   18.5 ms - fl/math/fixed_point/s8x8.h
  │ │     ├─   18.4 ms - fl/math/fixed_point/s8x24.h
  │ │     └─   18.2 ms - fl/math/fixed_point/s24x8.h
  │ └─    0.9 ms - chsv.h
  │   └─    0.7 ms - fl/gfx/hsv.h
  ├─  169.8 ms - platforms.h
  │ └─  169.7 ms - platforms/stub/fastled_stub.h
  │   ├─  132.4 ms - platforms/stub/fastspi_stub.h
  │   │ └─  132.4 ms - platforms/stub/fastspi_stub_generic.h
  │   │   ├─  125.9 ms - platforms/shared/active_strip_data/active_strip_data.h
  │   │   │ └─  123.7 ms - fl/id_tracker.h
  │   │   │   └─  122.6 ms - fl/stl/mutex.h
  │   │   │     └─  122.5 ms - platforms/mutex.h
  │   │   │       └─  122.4 ms - platforms/stub/mutex_stub.h
  │   │   │         └─  122.4 ms - platforms/stub/mutex_stub_stl.h
  │   │   └─    6.1 ms - platforms/shared/active_strip_tracker/active_strip_tracker.h
  │   └─   37.2 ms - platforms/stub/clockless_stub.h
  │     └─   37.2 ms - platforms/stub/clockless_channel_stub.h
  │       ├─   13.3 ms - fl/channels/data.h
  │       │ └─    9.9 ms - fl/channels/config.h
  │       │   ├─    2.2 ms - fl/chipsets/chipset_timing_config.h
  │       │   │ └─    1.4 ms - fl/chipsets/led_timing.h
  │       │   └─    1.7 ms - fl/chipsets/spi.h
  │       ├─   13.2 ms - fl/system/log.h
  │       │ └─   12.8 ms - fl/stl/strstream.h
  │       ├─    2.4 ms - fl/channels/manager.h
  │       ├─    1.6 ms - fl/stl/weak_ptr.h
  │       └─    1.1 ms - fl/channels/driver.h
  ├─   65.8 ms - pixeltypes.h
  │ ├─   62.1 ms - lib8tion.h
  │ │ ├─   52.8 ms - fl/math/math8.h
  │ │ │ ├─   45.4 ms - fl/math/scale8.h
  │ │ │ │ └─   45.3 ms - platforms/scale8.h
  │ │ │ │   └─   43.7 ms - platforms/shared/scale8.h
  │ │ │ ├─    5.3 ms - fl/math/intmap.h
  │ │ │ │ └─    4.1 ms - platforms/intmap.h
  │ │ │ └─    2.1 ms - platforms/math8.h
  │ │ │   └─    1.7 ms - platforms/shared/math8.h
  │ │ ├─    2.0 ms - fl/math/beat.h
  │ │ │ └─    1.1 ms - fl/math/trig8.h
  │ │ │   └─    1.0 ms - platforms/trig8.h
  │ │ │     └─    0.9 ms - platforms/shared/trig8.h
  │ │ └─    0.5 ms - fl/math/qfx.h
  │ └─    3.3 ms - crgb.hpp
  ├─   42.9 ms - colorutils.h
  │ └─   42.5 ms - fl/gfx/colorutils.h
  │   ├─    8.9 ms - fl/gfx/blur.h
  │   │ └─    4.7 ms - fl/gfx/canvas.h
  │   │   └─    2.9 ms - fl/math/alpha.h
  │   ├─    3.2 ms - fl/gfx/fill.h
  │   └─    1.8 ms - fl/gfx/crgb16.h
  └─   23.8 ms - pixel_controller.h
    ├─   17.2 ms - pixel_iterator.h
    │ └─   17.1 ms - fl/chipsets/encoders/pixel_iterator.h
    │   ├─    5.2 ms - fl/chipsets/encoders/apa102.h
    │   │ └─    4.0 ms - fl/chipsets/encoders/encoder_utils.h
    │   │   └─    3.3 ms - fl/gfx/gamma_lut.h
    │   ├─    4.5 ms - fl/chipsets/encoders/pixel_iterator_adapters.h
    │   ├─    1.0 ms - fl/chipsets/encoders/sk9822.h
    │   └─    0.9 ms - fl/chipsets/encoders/hd108.h
    └─    2.6 ms - rgbw.h
      └─    2.4 ms - fl/gfx/rgbw.h
fl/stl/stdint.h (682.5ms)
  └─  438.8 ms - platforms/int.h
    ├─  438.1 ms - platforms/shared/int.h
    │ └─  438.0 ms - platforms/shared/int_linux.h
    └─    0.7 ms - platforms/arm/is_arm.h
fl/ui.h (162.0ms)
  ├─   76.5 ms - fl/stl/json.h
  │ └─   59.4 ms - fl/stl/json/types.h
  │   └─    7.6 ms - fl/stl/limits.h
  ├─   10.1 ms - fl/asset.h
  │ └─    8.5 ms - fl/stl/url.h
  └─   10.1 ms - fl/ui_impl.h
    └─    9.5 ms - platforms/ui_defs.h
      ├─    2.1 ms - platforms/shared/ui/json/audio.h
      │ └─    1.0 ms - platforms/shared/ui/json/audio_internal.h
      ├─    1.6 ms - platforms/shared/ui/json/button.h
      │ └─    0.7 ms - platforms/shared/ui/json/ui_internal.h
      ├─    0.9 ms - platforms/shared/ui/json/help.h
      ├─    0.8 ms - platforms/shared/ui/json/number_field.h
      └─    0.8 ms - platforms/shared/ui/json/description.h

TOP 20 SLOWEST OPERATIONS
--------------------------------------------------------------------------------
  1.  4734.2 ms - Source: FastLED.h
  2.  4734.2 ms - Total Source: 
  3.  3073.1 ms - Source: fl/task/executor.h
  4.  2206.4 ms - Source: fl/task/promise.h
  5.  2110.9 ms - Source: fl/stl/function.h
  6.  1362.9 ms - Source: fl/stl/shared_ptr.h
  7.  1288.8 ms - Total ParseClass: 
  8.  1192.6 ms - Source: fl/stl/type_traits.h
  9.   852.7 ms - Source: fl/task/scheduler.h
 10.   843.2 ms - Source: fl/stl/singleton.h
 11.   842.4 ms - Source: fl/stl/thread_local.h
 12.   841.2 ms - Source: fl/stl/thread.h
 13.   841.1 ms - Source: platforms/thread.h
 14.   841.1 ms - Source: platforms/stub/thread_stub.h
 15.   841.0 ms - Source: platforms/stub/thread_stub_stl.h
 16.   821.7 ms - Source: thread
 17.   696.1 ms - Source: fl/fastled.h
 18.   682.5 ms - Source: fl/stl/stdint.h
 19.   663.8 ms - Source: fl/stl/move.h
 20.   508.1 ms - Source: std_thread.h

PERFORMANCE FLAGS
--------------------------------------------------------------------------------
⚠️  SLOW HEADERS (>50.0ms):
    - FastLED.h (4734.2ms)
    - fl/task/executor.h (3073.1ms)
    - fl/task/promise.h (2206.4ms)
    - fl/stl/function.h (2110.9ms)
    - fl/stl/shared_ptr.h (1362.9ms)
    - fl/stl/type_traits.h (1192.6ms)
    - fl/task/scheduler.h (852.7ms)
    - fl/stl/singleton.h (843.2ms)
    - fl/stl/thread_local.h (842.4ms)
    - fl/stl/thread.h (841.2ms)

✓  Template instantiation time is acceptable (<15% of total)
✓  Lexing time is acceptable (<10% of total)

RECOMMENDATIONS
--------------------------------------------------------------------------------
1. Consider optimizing FastLED.h (4734.2ms)
2. Consider optimizing fl/task/executor.h (3073.1ms)
3. Consider optimizing fl/task/promise.h (2206.4ms)

================================================================================

@zackees
zackees merged commit 5097889 into master Apr 22, 2026
1 of 85 checks passed
@zackees
zackees deleted the fix-2371-direct-controller-show branch August 21, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Multiple instance interface no longer functioning

1 participant