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
Make legacy FastLED.show() on the ESP32 RMT path as fast as it can be inside the current layered architecture:
controller → ChannelManager → channel engine → ESP-IDF.
The work runs as a ralph loop: one sub-issue at a time, each one its own PR merged through the queue. Do the measurement sub-issue first, because every other sub-issue uses it to show its result.
Where we are
ESP32-C6, 35 WS2812 on the legacy addLeds path (the #2994 reproducer):
Each show() now runs about 12.4k instructions over about 34k cycles, an IPC of about 0.4. Roughly 60% of the cycles are stalls. Putting the hot path in IRAM made no difference.
Only about 4.3k of those instructions are work a single strip actually needs:
encode: about 1.9k;
rmt_transmit() inside ESP-IDF: about 2.0k;
buffer copy: about 0.4k.
The rest is overhead from making every layer handle the general case (many strips, many drivers, fallback, async completion).
Most of that overhead is in how each layer is written, not in the layering itself. Each layer gets a cheap path for the common case and keeps the general path for everything else.
How every change is measured
Accept each change on instructions per show(), read from the ESP32-C6's performance counter. That count doesn't move with code layout.
Use wall time only to check cumulative progress, through the AutoResearch latency gate (#5369, tests/data/show_latency_budget.txt). #5362 was closed because a layout-only wall-time "win" vanished on the next build of master.
Done when
Every sub-issue is either merged or closed with measured evidence that it isn't worth doing.
tests/data/show_latency_budget.txt is lowered to the new measured mean plus margin.
Legacy RGB (latency gate), instructions per show()
12,926
12,578 (−2.7%)
ESP32-S3 Blink flash
320,451 B
319,439 B (−1,012 B)
New sub-issue found while doing it: #5399, the channel-API plain-RGB encode. It still runs per pixel and has no latency measurement.
#5379 (skip idle drivers) was triaged as unsafe in its original form; see the comment on that issue. Next up: #5380, then a re-measurement to decide #5379.
Running total, legacy RGB path (instructions per show()): 12,926 at the start of the series → 12,578 now.
#5380 done (PR #5416, merged): fl::string removed from DriverState on the poll() hot path.
ESP32-C6, legacy RMT, 35 LEDs:
Before
After
Instructions per show()
12,841
9,995 (−22.2%)
Mean show()
253.7 µs
169.9 µs
ESP32-S3 image_flash
319,027 B
318,783 B (−244 B)
The "before" count includes unrelated PRs that merged after #5377 (#5413, #5414).
#5379 closed as not planned. Drivers register only when used (#2428), so a default program polls only one driver, and there are no idle drivers to skip. The details are in the closing comment on #5379.
#5382 done (PR #5419, merged): RMT5 single-strip fast path. Measured on the ESP32-C6 by alternating BEFORE and AFTER builds twice, with identical instrumentation on both:
Before
After
Instructions per show()
10,542
9,870 (−6.4%)
Real cycles per show()
22,156
24,256 (+9.5%)
Mean show() (counter off)
137.4 µs
149.7 µs
ESP32-S3 image_flash
318,787 B
318,695 B
The first measurement showed +42 µs; that did not reproduce. In all 4,432 measured calls show() returned while the RMT was still DRAINING, so no wait was added.
The +12 µs that remains is deterministic: cycles rose while instructions fell, and IPC is about 0.41. That points to instruction-cache stalls on the flash-resident hot path, filed as new sub-issue #5422.
Orchestrator clud-1167194, picking up from the series order in the 09:35Z comment. #5381 is done (#5424, #5425). There's been no series activity since #5423, so next:
#5383 done (PR #5423, merged): reuse the RMT channel bound to a pin. ESP32-C6, legacy RMT, 35 LEDs, alternating BEFORE/AFTER twice:
Before
After
Instructions per show()
9,870
9,732 (−1.4%)
Real cycles per show()
~23,546
~22,018 (−6.5%)
Mean show() (counter off)
~145 µs
~136 µs
#5381 was landed by another session (PR #5424) with no C6 measurement. Triage shows it can't change the RMT benchmark, or any async DMA driver at any frame rate: the cache helps only synchronous drivers. See the correction on #5381.
Running total, legacy RGB (instructions per show()): 12,926 at the start of the series → ~9,732 now (−24.7%). Other sessions' PRs that merged in between moved the baseline. A clean start-vs-end measurement on one commit comes at the end.
All sub-issues complete (#5422 closed as measured/refuted; #5378 landed in #5508). Post-#5508 ESP32-C6 RMT show() measured at 125.3 µs mean (min 124, max 172; 8,352 instr/show, est. IPC 0.42; down from 205–245 µs / 12.4k instr/show). PR #5510 lowers esp32c6 RMT in tests/data/show_latency_budget.txt to 175 µs and adds esp32c6 PARLIO 360 µs; final table posted on #5356.
Activity
zackees commentedon Nov 21, 2026
Suggested order for the ralph loop:
beginTransmission(about 1k).fl::stringoffpoll().After each merge, re-measure instructions per
show()and wall time, and post both here. Lowertests/data/show_latency_budget.txtat the end.zackees commentedon Nov 22, 2026
#5377 done (PR #5403, merged): bulk RGBW/RGBWW encode.
show()show()show()New sub-issue found while doing it: #5399, the channel-API plain-RGB encode. It still runs per pixel and has no latency measurement.
#5379 (skip idle drivers) was triaged as unsafe in its original form; see the comment on that issue. Next up: #5380, then a re-measurement to decide #5379.
Running total, legacy RGB path (instructions per
show()): 12,926 at the start of the series → 12,578 now.zackees commentedon Nov 22, 2026
#5380 done (PR #5416, merged):
fl::stringremoved fromDriverStateon thepoll()hot path.ESP32-C6, legacy RMT, 35 LEDs:
show()show()image_flashThe "before" count includes unrelated PRs that merged after #5377 (#5413, #5414).
#5379 closed as not planned. Drivers register only when used (#2428), so a default program polls only one driver, and there are no idle drivers to skip. The details are in the closing comment on #5379.
#5399 closed by #5413.
Remaining: #5382 (in progress), #5383, #5381, #5384, #5378.
Running total (legacy RGB, instructions per
show()): 12,926 at the start of the series → 9,995 now (−22.7%).zackees commentedon Nov 22, 2026
#5382 done (PR #5419, merged): RMT5 single-strip fast path. Measured on the ESP32-C6 by alternating BEFORE and AFTER builds twice, with identical instrumentation on both:
show()show()show()(counter off)image_flashThe first measurement showed +42 µs; that did not reproduce. In all 4,432 measured calls
show()returned while the RMT was still DRAINING, so no wait was added.The +12 µs that remains is deterministic: cycles rose while instructions fell, and IPC is about 0.41. That points to instruction-cache stalls on the flash-resident hot path, filed as new sub-issue #5422.
Remaining: #5383, #5381, #5384, #5422, #5378.
docs(skills): add esp-perf-counters skill for ESP32 RISC-V instructio…
test(autoresearch): report instructions per show() from the RISC-V pe…
perf(rmt5): single-channel fast path in beginTransmission (FastLED#5382…
zackees commentedon Nov 22, 2026
Orchestrator clud-1167194, picking up from the series order in the 09:35Z comment. #5381 is done (#5424, #5425). There's been no series activity since #5423, so next:
show()mode in AutoResearch timingDrift, with instruction and cycle counts posted to perf(esp32): measure and cut instruction-cache stalls on the show() hot path (IPC ~0.41 on C6) (#5375) #5422. Nosrc/changes.#5384 is untouched. If you're mid-way through any of these, reply and I'll stop.
zackees commentedon Nov 22, 2026
#5383 done (PR #5423, merged): reuse the RMT channel bound to a pin. ESP32-C6, legacy RMT, 35 LEDs, alternating BEFORE/AFTER twice:
show()show()show()(counter off)#5381 was landed by another session (PR #5424) with no C6 measurement. Triage shows it can't change the RMT benchmark, or any async DMA driver at any frame rate: the cache helps only synchronous drivers. See the correction on #5381.
Remaining: #5384 (in progress), #5422, #5378.
Running total, legacy RGB (instructions per
show()): 12,926 at the start of the series → ~9,732 now (−24.7%). Other sessions' PRs that merged in between moved the baseline. A clean start-vs-end measurement on one commit comes at the end.zackees commentedon Dec 3, 2026
All sub-issues complete (#5422 closed as measured/refuted; #5378 landed in #5508). Post-#5508 ESP32-C6 RMT
show()measured at 125.3 µs mean (min 124, max 172; 8,352 instr/show, est. IPC 0.42; down from 205–245 µs / 12.4k instr/show). PR #5510 lowersesp32c6 RMTintests/data/show_latency_budget.txtto175µs and addsesp32c6 PARLIO 360µs; final table posted on #5356.perf(autoresearch): tighten esp32c6 RMT show() latency budget to 175 …