Skip to content

[Bug] Compounded timing inaccuracy on master compared to 3.10.3 (Follow-up to #2420) #2994

Description

@nomakewan

Board / MCU

ESP32-S3

LED Chipset

WS2812B / NeoPixel

FastLED Version

master#27a1583

Arduino / PlatformIO version

PlatformIO 6.1.19

Operating System

Windows

Description

Per the close message in #2420 asking to open a new issue if #2420 was not correctly resolved, I am opening this issue to confirm that #2420 was not correctly resolved and that the timing drift first reported in #2420 is very much still present as of master#27a1583.

Per the request in the closure message asking for serial data timing messages, I have provided the timing messages confirming that the drift is not microseconds as suggested but is rather 63~300 milliseconds per sequence iteration.

Please additionally note that the serial output with the exact same minimal sketch on 3.10.3 looks like this:

2495
2495
2495
2495
2495
2495
2495
2495
2495
2495

Considering the only difference between the data posted below and the data posted above is FastLED 3.10.3 versus master#27a1583, this strongly suggests that the underlying timing issue reported in #2420 is as yet unresolved, and is indeed caused by FastLED itself rather than any bug in the program, the millisDelay library, or the ESP-IDF framework.

Steps to reproduce

  1. Target FastLED master#27a1583.
  2. Compile minimal sketch.
  3. See that timing precision is significantly more unreliable than 3.10.3.

Minimal sketch

#include <Arduino.h>
#include <millisDelay.h>
#include <FastLED.h>

uint32_t i_iteration_time = 0;
uint8_t i_post_fade = 255;
CRGB leds[35];
#define LED_PIN 4
#define FAST_LED_UPDATE_MS 5
#define NUM_LEDS 35 // 35-LED NeoPixel ring
uint8_t i_fast_led_delay = FAST_LED_UPDATE_MS;
millisDelay ms_fast_led;
millisDelay ms_delay_post;

void setup() {
  FastLED.addLeds<NEOPIXEL, LED_PIN>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
  FastLED.setMaxRefreshRate(800);
  FastLED.show();

#ifdef ESP32
  setCpuFrequencyMhz(160);
  Serial.begin(115200);
#endif

  ms_delay_post.start(0);
  ms_fast_led.start(i_fast_led_delay);
}

void updateLEDs() {
  if(ms_fast_led.justFinished()) {
    FastLED.show();
    ms_fast_led.start(i_fast_led_delay);
  }
}

void loop() {
  if(i_post_fade > 0 && ms_delay_post.justFinished()) {
    const uint8_t i_ring_start = 0;
    const uint8_t i_ring_end = 34;
    const uint8_t i_ring_divisor = 7;
    uint8_t i_ring_counter = 0;

    i_ring_counter = ((255 - i_post_fade) / i_ring_divisor) + i_ring_start;

    if(i_ring_counter <= i_ring_end) {
      leds[i_ring_counter] = CRGB::Red;
    }

    if(i_ring_counter - 1 >= i_ring_start && i_ring_counter - 1 <= i_ring_end) {
      leds[i_ring_counter - 1] = CRGB::Black;
    }

    i_post_fade--;

    if(i_post_fade == 0) {
      Serial.println(millis() - i_iteration_time);
      i_iteration_time = millis();
      ms_delay_post.stop();

      for(uint8_t i = i_ring_start; i <= i_ring_end; i++) {
        leds[i] = CRGB::Black;
      }

      updateLEDs();
      delay(1000);
      i_post_fade = 255;
      ms_delay_post.start(225);
      return;
    }
    else {
      ms_delay_post.start(5);
    }
  }

  updateLEDs();
}

Serial / debug output

2563
2654
2752
2738
2752
2750
2579
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2592
2638
2566
2745
2582
2575
2750
2747
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563
2564
2563

Checklist

  • I have searched existing issues for duplicates
  • I have tested with the latest FastLED release or git master
  • I can reproduce this with a minimal sketch

Activity

  1. added
    status: triage
    type: bug
    on Jun 9, 2026
  2. zackees commented on Jun 9, 2026

    @zackees
    Member

    tapped out of credits until thursday.

  3. zackees commented on Jul 29, 2026

    @zackees
    Member

    Root-caused. This is not microsecond-level drift — it is FreeRTOS tick quantization inside FastLED.show()'s refresh-rate throttle, and it explains both the magnitude and why 3.10.3 was rock-steady.

    The regression

    git log -L on the throttle loop in src/FastLED.cpp.hpp gives the exact 3.10.3 → master delta, commit 5c8f7a1e7f ("try and fix wifi slowdown", refs #2193):

    -	while(mNMinMicros && ((fl::micros()-lastshow) < mNMinMicros));
    +	while(mNMinMicros && ((fl::micros()-lastshow) < mNMinMicros)) {
    +#if SKETCH_HAS_LARGE_MEMORY
    +		fl::task::run(250, fl::task::ExecFlags::SYSTEM);
    +#endif
    +	}

    3.10.3 spun in a microsecond-accurate busy-wait. Master sleeps.

    Why the sleep is far longer than 250 µs

    1. fl::task::run(250, SYSTEM) — src/fl/task/executor.cpp.hpp:135-141. Because microseconds > 0, it calls pumpCoroutines(1000). The caller's 250 µs is discarded; 1000 is hardcoded.
    2. pumpCoroutines on ESP32 — src/platforms/esp/32/coroutine_esp32.impl.hpp:82-85. It converts µs→ticks and then forces a floor:
      if (ticks == 0) { ticks = 1; }
      vTaskDelay(ticks);
    3. So every iteration of the throttle loop sleeps at least one full FreeRTOS tick — 1 ms on Arduino-ESP32 (1000 Hz), 10 ms on default ESP-IDF (100 Hz).

    Your sketch sets setMaxRefreshRate(800), so mNMinMicros = 1250 µs. The throttle needs to wait ~1.25 ms but can only wake on 1 ms tick boundaries — so each show() overshoots by a variable 0–1 ms, and it never averages out because it re-quantizes every frame.

    The numbers match

    Your sequence is 2495 ms with show() every 5 ms ≈ 499 shows per sequence. At 1 ms tick granularity:

    jitter per show drift per sequence
    0.05 ms +25 ms
    0.25 ms +125 ms
    0.60 ms +299 ms

    Predicted 25–299 ms. You reported 63–300 ms. That is the whole effect.

    It also explains the "compounded" framing from #2420 — it is not accumulating error, it is ~500 independent quantization events per sequence.

    Why a plain revert is wrong

    The yield was added deliberately: without it, show() busy-waits with interrupts effectively starving lower-priority tasks, which caused the WiFi/websocket starvation in #2193 and #2254. Reverting reintroduces those.

    Suggested fix

    Only take the deep yield when there is at least a full tick left to burn; spin the sub-tick remainder:

    while (mNMinMicros && ((fl::micros() - lastshow) < mNMinMicros)) {
    #if SKETCH_HAS_LARGE_MEMORY
        const fl::u32 remaining = mNMinMicros - (fl::micros() - lastshow);
        if (remaining >= FL_TICK_PERIOD_US) {
            fl::task::run(250, fl::task::ExecFlags::SYSTEM);  // long wait: be a good citizen
        }
        // sub-tick remainder: spin, because vTaskDelay would overshoot past our deadline
    #endif
    }

    Long throttles (low setMaxRefreshRate) keep yielding to WiFi/lwIP exactly as today; short ones stay microsecond-accurate like 3.10.3. Note that at any refresh rate above ~1000 Hz the entire wait is sub-tick, so today it is pure quantization noise.

    A second, independent bug worth fixing regardless: executor.cpp.hpp:138 ignores its microseconds argument and hardcodes pumpCoroutines(1000). Every caller asking for a shorter yield silently gets 1000 µs (then rounded up to a tick).

    Caveats

    Analysis is from source and git history — I do not have an ESP32-S3 on hand, so I have not measured this on your setup. Two things would confirm it in minutes:

    • Set FastLED.setMaxRefreshRate(0) to disable the throttle entirely. If timing snaps back to a steady 2495, this is confirmed.
    • Or log micros() immediately before and after FastLED.show() — you should see it consistently overshoot to ~1 ms boundaries rather than ~1250 µs.

    Happy to put up the fix if the maintainers agree with the approach; it needs someone with hardware to validate that WiFi fairness is preserved.

  4. zackees commented on Jul 29, 2026

    @zackees
    Member

    Filed #3762 with the full analysis and a proposed fix. Short version: show()'s refresh throttle is the last call site still taking an unconditional deep yield — the same defect was already fixed in the channel wait loops by 9d71de01d0 (skip the vTaskDelay(1) floor) and #2817 (NetworkDetector gating). show() was missed.

    #3762 also raises whether the yield is needed at all now that transposition is fast, and proposes an ESP32-C6 bench experiment to settle it by measurement rather than argument.

  5. nomakewan commented on Jul 29, 2026

    @nomakewan
    ContributorAuthor

    Analysis is from source and git history — I do not have an ESP32-S3 on hand, so I have not measured this on your setup. Two things would confirm it in minutes:

    * Set `FastLED.setMaxRefreshRate(0)` to disable the throttle entirely. If timing snaps back to a steady 2495, this is confirmed.
    

    Setting this did not resolve the issue. Please note that in the meantime between filing this issue and now, a new version of the ESP-IDF framework has been released. I have updated to this latest version, and updating did not have any effect whatsoever on the results. Please see the timing below with FastLED.setMaxRefreshRate(0); set in setup().

    ESP-ROM:esp32s3-20210327
    Build:Mar 27 2021
    rst:0x15 (USB_UART_CHIP_RESET),boot:0x8 (SPI_FAST_FLASH_BOOT)
    Saved PC:0x40378dca
    SPIWP:0xee
    mode:DIO, clock div:1
    load:0x3fce2820,len:0x10cc
    load:0x403c8700,len:0xc2c
    load:0x403cb700,len:0x30b0
    entry 0x403c88b8
    
    E (28) cache: esp_cache_msync(113): invalid addr or null pointer
    
    2650
    2633
    2677
    2647
    2629
    2647
    2619
    2613
    2633
    2668
    2640
    2612
    2626
    2592
    2710
    2645
    2645
    2591
    2626
    2584
    2643
    2668
    2613
    2655
    2631
    2621
    2627
    2661
    
  6. moved this from Triage to Done in FastLED Trackeron Jul 29, 2026
  7. nomakewan commented on Jul 29, 2026

    @nomakewan
    ContributorAuthor

    I have tested commit 1e70d60 on real hardware and the problem not only persists, but the timing drift has become measurably worse. Please see the following serial output.

    E (689) cache: esp_cache_msync(113): invalid addr or null pointer
    
    2732
    2743
    2983
    2747
    2752
    2648
    2745
    2654
    2743
    2988
    2752
    2650
    2752
    2738
    2745
    2990
    2745
    2741
    2752
    2743
    

    I request this issue be reopened as it has not been resolved.

  8. zackees commented on Jul 29, 2026

    @zackees
    Member

    Retracting my earlier root-cause analysis, and reopening — this is not fixed.

    I previously concluded the drift came from FreeRTOS tick quantization inside CFastLED::show()'s refresh-rate throttle, and #3764 was merged on that basis, which auto-closed this issue. That conclusion was wrong.

    The throttle never runs in your sketch. show() is gated by ms_fast_led at 5 ms. Subtracting the ~1050 us WS2812 transmit for 35 LEDs, the throttle sees ~3950 us elapsed against mNMinMicros = 1250 us at setMaxRefreshRate(800):

    show() called every                  5000 us
    WS2812 transmit, 35 LEDs             1050 us
    elapsed seen by throttle             3950 us
    mNMinMicros @ setMaxRefreshRate(800) 1250 us
    throttle engages?                    NO   (3950 >= 1250 -> loop exits on first check)
    

    So the code path #3764 changed is never reached by your sketch and cannot explain what you measured. #3764 is a genuine improvement for sketches that do hit the throttle, but it is not a fix for this.

    How I got it wrong, since it is instructive: my supporting arithmetic (predicted 25-299 ms vs your reported 63-300 ms) came from choosing a per-frame jitter fraction freely across an order of magnitude. Three arbitrary multipliers will bracket almost any target. I treated that as confirmation when it was curve-fitting, and I never ran the one check that would have falsified it in seconds — does the throttle condition ever evaluate true here? — despite having your sketch the whole time. Apologies for the noise.

    Where the evidence actually points. Your drift is 68-257 ms over 254 fade steps = 268-1012 us per step. A single WS2812 show() for 35 LEDs is ~1050 us — the same order of magnitude. That implicates show()'s duration, not throttle quantization: your loop polls justFinished() once per iteration, so a longer show() widens the gap between a 5 ms deadline passing and the poll observing it, and that excess compounds across 254 steps.

    The real question is therefore why FastLED.show() got slower between 3.10.3 and master. Candidates, unranked and unmeasured: the RMT5/channels driver rewrite, per-frame transposition/encoding cost, EngineEvents begin/end-frame listener work, or per-frame allocation/logging added since 3.10.3.

    Tracking the investigation in #3765.

    Two things that would help enormously if you have a moment, both about 5 minutes:

    1. Time show() directly on both versions:

      uint32_t t0 = micros();
      FastLED.show();
      Serial.println(micros() - t0);

      If master reports meaningfully more than 3.10.3 for your 35-LED strip, that confirms the direction and gives us a number to bisect against.

    2. Confirm the throttle is irrelevant by setting FastLED.setMaxRefreshRate(0) on master. My analysis says your timing will be unchanged. If it does change, my retraction is itself wrong and I want to know.

  9. moved this from Done to Triage in FastLED Trackeron Jul 29, 2026
  10. 9 remaining items

  11. nomakewan commented on Oct 15, 2026

    @nomakewan
    ContributorAuthor

    Since there have been several official releases since this was last touched, I wanted to check in to see if some random commit somewhere had corrected this issue. It has not.

    I will start by applauding you for managing to get the compile sizes back down under control. Here are 3.10.7 versus 3.10.3 on the ESP32-S3, compiled with PlatformIO and the latest Pioarduino:

    3.10.3 (latest Pioarduino)
    RAM:   [=         ]   7.2% (used 23504 bytes from 327680 bytes)
    Flash: [          ]   3.9% (used 310596 bytes from 7995392 bytes)
    
    3.10.7 (Commit d4a2d3a, latest Pioarduino)
    RAM:   [=         ]   7.4% (used 24164 bytes from 327680 bytes)
    Flash: [          ]   4.3% (used 346303 bytes from 7995392 bytes)
    

    Below is the microsecond capture for the "corrected" version of 3.10.7 which actually compiles on ESP32-S3, commit d4a2d3a. Note also that this build is updated to the latest stable version of Pioarduino, https://github.com/pioarduino/platform-espressif32/releases/download/55.03.312-1/platform-espressif32.zip.

    ESP-ROM:esp32s3-20210327
    <LF>Build:Mar 27 2021
    <LF>rst:0x15 (USB_UART_CHIP_RESET),boot:0x9 (SPI_FAST_FLASH_BOOT)
    <LF>Saved PC:0x40378dca
    <LF>SPIWP:0xee
    <LF>mode:DIO, clock div:1
    <LF>load:0x3fce2820,len:0x10cc
    <LF>load:0x403c8700,len:0xc2c
    <LF>load:0x403cb700,len:0x30b0
    <LF>entry 0x403c88b8
    
    E (28) cache: esp_cache_msync(113): invalid addr or null pointer
    
    2360
    2374
    2356
    2355
    2357
    2357
    2357
    2355
    2359
    2357
    2357
    2356
    2357
    2356
    2357
    2355
    2356
    2356
    2356
    2356
    2357
    2356
    2357
    2356
    2356
    2355
    2356
    2357
    2356
    2358
    2359
    2356
    2357
    2355
    2357
    2356
    2355
    2359
    2357
    2353
    2357
    2355
    2355
    2358
    2356
    2353
    2357
    2357
    2359
    2355
    2357
    2355
    2356
    2357
    2358
    2357
    2355
    2358
    2356
    2357
    2355
    2356
    2356
    2355
    2356
    2355
    2355
    2355
    2355
    2356
    2355
    2355
    2359
    2355
    2355
    2355
    2360
    2354
    2358
    2357
    2355
    2359
    2356
    2357
    2356
    2355
    2356
    2357
    2359
    2357
    2356
    2357
    2359
    2359
    2355
    2357
    2356
    2355
    2357
    2356
    2354
    2357
    2356
    2359
    2356
    2359
    2356
    2355
    2357
    2357
    2356
    2358
    2357
    2357
    2357
    2357
    2356
    2358
    2355
    2355
    2359
    2357
    2356
    2358
    2356
    2355
    2358
    2356
    2359
    2354
    2359
    2357
    2355
    2357
    2355
    2354
    2360
    2357
    2359
    2356
    2355
    2356
    2356
    2357
    2357
    2356
    2355
    2355
    2355
    2357
    2357
    2356
    2355
    2355
    2356
    2357
    2358
    2360
    2355
    2358
    2359
    2359
    2357
    2357
    2357
    2356
    2359
    2355
    2356
    2357
    2357
    2357
    2359
    2359
    2359
    2354
    2357
    2357
    2355
    2358
    2357
    2354
    2357
    2357
    2353
    2358
    2357
    2359
    2360
    2354
    2357
    2357
    2354
    2357
    2355
    2353
    2358
    2357
    2355
    2358
    2358
    2354
    2360
    2357
    2355
    2357
    2355
    2353
    2358
    2359
    2354
    2358
    2355
    2355
    2359
    2357
    2355
    2357
    2357
    2354
    2360
    2356
    2354
    2357
    2358
    2353
    

    As you can see, while the timing has improved by about 300 microseconds from commit 1e70d60, it remains roughly 21x slower than 3.10.3 which seems to explain the timing drift observed in FastLED since that release.

  12. nomakewan commented on Nov 3, 2026

    @nomakewan
    ContributorAuthor

    Since I see there have been two more official releases since my last post, I shall update this once again to show that 3.10.9 does not fix this issue either. It is still 21x slower than 3.10.3.

    2329
    2328
    2328
    2328
    2326
    2328
    2326
    2328
    2329
    2329
    2326
    2328
    2326
    2329
    2329
    2328
    2326
    2328
    2330
    2326
    2326
    2326
    2330
    2328
    2326
    2329
    2328
    2329
    2329
    2328
    2326
    2328
    2324
    2326
    2328
    2328
    2328
    2329
    2329
    2328
    2329
    2324
    2328
    2328
    2328
    2328
    2324
    2328
    2328
    2324
    2328
    2328
    2328
    2324
    2328
    2328
    2329
    2329
    2328
    2329
    2324
    2326
    2329
    2329
    2329
    2324
    2328
    2326
    2329
    2329
    2324
    2326
    2329
    2324
    2329
    2328
    2324
    2330
    2329
    2326
    2328
    2329
    2324
    2328
    2328
    2324
    2329
    2328
    2329
    2328
    2330
    2324
    2329
    2328
    2328
    2328
    2328
    2326
    2329
    2326
    2329
    2328
    2329
    2324
    2329
    2326
    2329
    2329
    2329
    2329
    2328
    2329
    2329
    2329
    2329
    2329
    2329
    2329
    2326
    2326
    2328
    2326
    2328
    2329
    2328
    2324
    2328
    2329
    2328
    2328
    2324
    2326
    2326
    2328
    2324
    2328
    2329
    2324
    2328
    2329
    2329
    2328
    2329
    2326
    2328
    2326
    2329
    2329
    2329
    2329
    2324
    2330
    2329
    2328
    2328
    2328
    2329
    2329
    2329
    2329
    2329
    2329
    2324
    2328
    2328
    2324
    2329
    2329
    2329
    2324
    2328
    2329
    2326
    2330
    2328
    2328
    2326
    2330
    2329
    2328
    2328
    2324
    2329
    2328
    2329
    2329
    2326
    2326
    2328
    2324
    2328
    2329
    2326
    2326
    2329
    2328
    2328
    2328
    2324
    2328
    2328
    2326
    2328
    2328
    2329
    2325
    2328
    2326
    2329
    2329
    2324
    2328
    2328
    2329
    2329
    2328
    2329
    2328
    2329
    2326
    2329
    2328
    2329
    2326
    2328
    2329
    2326
    2330
    2328
    2329
    2329
    2328
    2329
    2329
    2328
    2326
    2328
    2329
    2328
    2324
    2328
    2329
    2328
    2324
    2076
    2328
    2326
    2329
    2328
    2328
    2328
    2330
    2326
    2329
    2328
    2329
    2326
    2326
    2326
    2328
    2328
    2328
    2326
    2329
    2328
    2328
    2328
    2327
    2326
    2328
    2326
    2326
    2326
    2329
    2329
    2328
    2326
    2328
    2329
    2325
    2327
    2329
    2330
    2324
    2331
    2328
    2325
    2328
    2329
    2324
    2327
    2329
    2329
    2328
    2330
    2328
    2325
    2328
    2330
    2324
    2327
    2328
    2329
    2326
    2331
    2328
    2327
    2328
    2330
    2328
    2329
    2330
    2329
    2330
    2330
    2326
    2327
    2329
    2325
    2328
    2327
    2326
    2327
    2328
    2329
    2324
    2327
    2328
    2329
    2328
    2325
    2328
    2330
    2329
    2325
    2329
    2329
    2324
    2329
    2328
    2325
    2328
    2330
    2326
    2331
    2326
    2325
    2328
    2329
    2329
    2329
    2326
    2331
    2328
    2325
    2328
    2329
    2329
    2325
    2328
    2330
    2328
    2330
    2326
    2327
    2326
    2325
    2328
    2329
    2329
    2325
    2328
    2330
    2329
    2325
    2328
    2329
    2328
    2325
    2327
    2330
    2329
    2329
    2329
    2329
    2324
    2327
    2329
    2325
    2328
    2330
    2328
    2329
    2326
    2327
    2328
    2330
    2328
    2325
    2328
    2330
    2324
    2327
    2327
    2330
    2329
    2325
    2328
    2327
    2328
    2325
    2327
    2327
    2328
    2325
    2328
    2327
    2329
    2329
    2326
    2327
    2329
    2325
    2328
    2327
    2326
    2327
    2326
    2325
    2328
    2327
    2326
    2331
    2328
    2330
    2326
    2331
    2328
    2325
    2327
    2330
    2329
    2325
    2328
    2327
    2328
    2325
    2328
    2329
    2328
    2330
    2328
    2330
    2324
    2327
    2328
    2325
    2328
    2330
    2326
    2327
    2326
    2330
    2324
    2327
    2329
    2330
    2330
    2325
    2326
    2327
    2328
    2330
    2324
    2330
    2329
    2330
    2324
    2329
    2328
    2325
    2076
    2329
    2328
    2328
    2328
    2329
    2328
    2328
    2329
    2329
    2327
    2328
    2328
    2329
    2326
    2328
    2328
    2328
    2329
    2328
    2328
    2329
    2326
    2329
    2328
    2328
    2326
    2326
    2330
    2329
    2328
    2329
    2330
    2328
    2330
    2329
    2328
    2328
    2329
    2328
    2326
    2328
    2328
    2328
    2329
    2329
    2326
    2328
    2328
    2329
    2329
    2329
    2324
    2329
    2327
    2329
    2326
    2328
    2326
    2329
    2329
    2329
    2326
    2328
    2326
    2328
    2324
    2328
    2329
    2328
    2329
    2329
    2328
    2329
    2324
    2328
    2328
    2328
    2326
    2329
    2329
    2328
    2328
    2329
    2324
    2328
    2328
    2328
    2324
    2328
    2328
    2328
    2329
    2328
    2326
    2328
    2328
    2328
    2330
    2328
    2328
    2329
    2329
    2328
    2329
    2329
    2329
    2326
    2329
    2328
    2328
    2328
    2324
    2328
    2329
    2329
    2326
    2329
    2329
    2329
    2329
    2328
    2330
    2328
    2328
    2328
    2326
    2328
    2328
    2329
    2326
    2328
    2328
    2328
    2329
    2329
    2328
    2328
    2324
    2326
    2326
    2329
    2324
    2328
    2328
    2329
    2328
    2326
    2328
    2328
    2328
    2329
    2324
    2328
    2328
    2328
    2326
    2328
    2326
    2329
    2326
    2328
    2328
    2329
    2328
    2328
    2324
    2328
    2329
    2324
    2328
    2326
    2326
    2328
    2328
    2326
    2329
    2329
    2329
    2326
    2327
    2328
    2326
    2328
    2328
    2329
    2329
    2326
    2329
    2328
    2326
    2328
    2328
    2329
    2328
    2329
    2328
    2328
    2328
    2329
    2329
    2328
    2328
    2324
    2330
    2328
    2326
    2328
    2328
    2329
    2326
    2328
    2328
    2329
    2328
    2328
    2326
    2328
    2329
    2329
    2329
    2326
    2330
    2328
    2329
    2329
    2329
    2326
    2326
    2328
    2328
    2326
    2329
    2328
    2326
    2328
    2328
    2326
    2328
    2328
    2329
    2329
    2326
    2328
    2326
    2329
    2328
    
  13. nomakewan commented on Nov 20, 2026

    @nomakewan
    ContributorAuthor

    As 3.10.10 is now out, I have done a new test. Note also that this build is updated to the latest stable version of Pioarduino, https://github.com/pioarduino/platform-espressif32/releases/download/55.03.313/platform-espressif32.zip.

    The processing time per show() call has reduced again, but even with the reduction 3.10.10 is still ~17x slower than 3.10.3. Here are the results:

    2403
    1879
    1866
    1855
    1855
    1867
    1877
    1862
    1863
    1856
    1874
    1862
    1871
    1856
    1872
    1855
    1856
    1856
    1879
    1864
    1874
    1855
    1884
    1860
    1870
    1856
    1878
    1855
    1874
    1856
    1877
    1862
    1855
    1854
    1875
    1857
    1868
    1870
    1883
    1859
    1865
    1858
    1879
    1861
    1876
    1857
    1879
    1858
    1857
    1854
    1879
    1863
    1873
    1855
    1879
    1865
    1876
    1856
    1881
    1857
    1871
    1861
    1878
    1856
    1873
    1854
    1878
    1862
    1877
    1856
    1881
    1858
    1857
    1858
    1881
    1855
    1874
    1856
    1879
    1863
    1870
    1853
    1879
    1856
    1859
    1861
    1878
    1859
    1870
    1855
    1879
    1864
    1866
    1857
    1879
    1858
    1874
    1861
    1874
    1856
    1873
    1855
    1882
    1858
    1867
    1855
    1877
    1858
    1856
    1855
    1878
    1857
    1874
    1869
    1878
    1859
    1856
    1857
    1883
    1863
    1854
    1871
    1879
    1857
    1865
    1852
    1866
    1861
    1877
    1855
    1877
    1858
    1855
    1871
    1883
    1857
    1866
    1854
    1858
    1858
    1870
    1855
    1878
    1861
    1870
    1855
    1881
    1855
    1870
    1857
    1883
    1861
    1874
    1857
    1879
    1856
    1856
    1865
    1879
    1858
    1875
    1862
    1878
    1858
    1869
    1857
    1883
    1855
    1856
    1856
    1878
    1861
    1874
    1859
    1882
    1856
    1870
    1852
    1880
    1858
    1877
    1860
    1883
    1859
    1873
    1855
    1878
    1856
    1868
    1857
    1878
    1858
    1856
    1856
    1878
    1858
    1863
    1855
    1864
    1856
    1868
    1856
    1874
    1861
    1871
    1857
    1879
    1866
    1875
    1858
    1882
    1856
    1868
    1853
    1884
    1857
    1870
    1863
    1878
    1854
    1865
    1856
    1877
    1856
    1875
    1858
    1880
    1856
    1875
    1863
    1882
    1860
    1874
    1858
    1880
    1859
    1874
    1859
    1879
    1856
    1867
    1861
    1879
    1859
    1865
    1855
    1880
    1863
    1871
    1857
    1876
    1855
    1855
    2084
    1863
    1856
    1875
    1868
    1875
    1859
    1866
    1873
    1875
    1869
    1855
    1860
    1865
    1858
    1862
    1870
    1875
    1856
    1875
    1856
    1869
    1859
    1864
    1877
    1875
    1857
    1862
    1869
    1874
    1858
    1872
    1855
    1869
    1868
    1859
    1874
    1877
    1858
    1872
    1877
    1874
    1856
    1875
    1859
    1868
    1859
    1859
    1870
    1876
    1858
    1864
    1873
    1865
    1873
    1864
    1872
    1877
    1868
    1857
    1871
    1868
    1867
    1865
    1872
    1863
    1871
    1856
    1855
    1868
    1869
    1858
    1875
    1875
    1857
    1862
    1867
    1876
    1872
    1859
    1858
    1866
    1857
    1872
    1871
    1875
    1856
    1863
    1875
    1877
    1858
    1870
    1857
    1875
    1871
    1856
    1867
    1877
    1857
    1865
    1868
    1874
    1859
    1877
    1873
    1875
    1875
    1858
    1859
    1869
    1858
    1860
    1876
    1877
    1858
    1873
    1857
    1882
    1857
    1864
    1882
    1876
    1858
    1863
    1868
    1877
    1859
    1864
    1856
    1878
    1871
    1857
    1859
    1878
    1856
    1864
    1875
    1877
    1858
    1871
    1858
    1874
    1870
    1858
    1874
    1878
    1858
    1865
    1879
    1874
    1859
    1863
    1875
    1874
    1868
    1858
    1860
    1876
    1857
    1874
    1858
    1876
    1866
    1860
    1858
    1870
    1857
    1859
    1875
    1876
    1860
    1861
    1869
    1877
    1855
    1861
    1869
    1868
    1857
    1855
    1871
    1866
    1856
    1860
    1875
    1862
    1859
    1873
    1857
    1869
    1858
    1864
    1872
    1877
    1857
    1863
    1875
    1869
    1859
    1867
    1871
    1871
    1857
    1870
    1870
    1871
    1859
    1868
    1869
    1866
    1872
    1863
    1854
    1874
    1859
    1866
    1877
    1876
    1868
    1863
    1870
    1877
    1858
    1867
    1874
    1878
    1859
    1865
    1869
    1877
    1860
    1863
    1874
    1869
    1861
    1873
    1876
    1871
    1860
    1865
    1872
    1874
    1859
    1866
    1879
    1868
    1857
    1876
    1870
    1874
    1872
    1855
    1859
    1870
    2085
    1868
    1860
    1868
    1873
    1858
    1857
    1870
    1859
    1879
    1860
    1878
    1858
    1863
    1856
    1870
    1858
    1873
    1856
    1871
    1859
    1857
    1860
    1875
    1859
    1879
    1859
    1868
    1871
    1860
    1858
    1869
    1861
    1857
    1870
    1875
    1859
    1867
    1857
    1868
    1872
    1878
    1857
    1871
    1859
    1860
    1873
    1878
    1856
    1864
    1857
    1867
    1874
    1860
    1875
    1872
    1860
    1866
    1871
    1871
    1859
    1866
    1857
    1870
    1872
    1873
    1859
    1869
    1859
    1860
    1869
    1879
    1860
    1866
    1858
    1875
    1873
    1865
    1858
    1869
    1869
    1859
    1871
    1877
    1858
    1865
    1859
    1867
    1871
    1877
    1857
    1870
    1869
    1860
    1873
    1871
    1859
    1866
    1857
    1876
    1860
    1861
    1859
    1866
    1859
    1879
    1871
    1877
    1859
    1865
    1868
    1878
    1859
    1874
    1859
    1875
    1859
    1866
    1871
    1882
    1856
    1860
    1860
    1870
    1861
    1861
    1877
    1871
    1857
    1860
    1870
    1872
    1868
    1863
    1872
    1870
    1858
    1858
    1860
    1869
    1871
    1858
    1871
    1869
    1871
    1861
    1856
    1869
    1873
    1877
    1857
    1876
    1860
    1876
    1859
    1871
    1868
    1869
    1858
    1869
    1875
    1865
    1858
    1870
    1859
    1862
    1875
    1870
    1858
    1870
    1871
    1865
    1860
    1867
    1857
    1869
    1858
    1861
    1856
    1870
    1857
    1863
    1871
    1866
    1874
    1858
    1858
    1870
    1869
    1875
    1871
    1880
    1859
    1869
    1858
    1879
    1870
    1861
    1856
    1872
    1859
    1869
    1859
    1874
    1859
    1866
    1857
    1871
    1860
    1861
    1858
    1868
    1861
    1861
    1873
    1877
    1858
    1879
    1860
    1876
    1874
    1861
    1857
    1869
    1860
    1860
    1871
    1875
    1860
    1866
    1877
    1867
    1873
    1879
    1856
    1872
    1860
    1859
    1870
    1879
    1861
    1866
    1857
    1879
    1862
    1873
    1859
    1870
    1860
    1876
    1861
    1875
    1860
    1867
    1859
    1879
    2086
    1859
    1859
    1869
    1859
    1860
    1858
    1878
    1864
    1865
    1860
    1870
    1873
    1868
    1859
    1877
    1861
    1862
    1873
    1877
    1860
    1860
    1857
    1869
    1866
    1862
    1856
    1870
    1860
    1862
    1860
    1880
    1860
    1877
    1857
    1872
    1873
    1875
    1859
    1877
    1861
    1862
    1873
    1879
    1863
    1863
    1858
    1877
    1860
    1877
    1857
    1874
    1859
    1863
    1860
    1879
    1863
    1863
    1859
    1872
    1860
    1863
    1857
    1880
    1860
    1862
    1860
    1882
    1862
    1869
    1858
    1878
    1863
    1863
    1859
    1881
    1862
    1863
    1862
    1881
    1858
    1863
    1857
    1880
    1859
    1874
    1857
    1871
    1863
    1860
    1862
    1878
    1863
    1867
    1858
    1878
    1861
    1874
    1859
    1873
    1861
    1877
    1860
    1870
    1860
    1862
    1860
    1878
    1862
    1876
    1859
    1872
    1862
    1866
    1871
    1870
    1863
    1863
    1859
    1877
    1864
    1861
    1858
    1881
    1861
    1860
    1859
    1872
    1861
    1865
    1859
    1878
    1861
    1865
    1860
    1873
    1863
    1868
    1861
    1881
    1859
    1867
    1859
    1881
    1861
    1871
    1857
    1872
    1863
    1868
    1861
    1880
    1862
    1869
    1858
    1880
    1860
    1860
    1861
    1879
    1874
    1864
    1873
    1871
    1870
    1861
    1872
    1870
    1863
    1863
    1859
    1873
    1869
    1861
    1859
    1868
    1859
    1868
    1862
    1869
    1862
    1862
    1871
    1870
    1863
    1863
    1862
    1870
    1875
    1863
    1872
    1870
    1874
    1861
    1858
    1871
    1861
    1860
    1860
    1878
    1862
    1862
    1859
    1865
    1861
    1875
    1860
    1871
    1860
    1865
    1861
    1874
    1861
    1867
    1859
    1869
    1864
    1863
    1856
    1871
    1863
    1863
    1861
    1882
    1858
    1869
    1858
    1869
    1862
    1877
    1861
    1872
    1864
    1862
    1861
    1878
    1861
    1868
    1873
    1880
    1862
    1864
    1859
    1874
    1861
    1862
    1862
    1880
    1863
    1878
    1858
    1869
    1861
    1869
    1859
    1878
    2084
    1862
    1864
    1875
    1862
    1865
    1860
    1865
    1863
    1863
    1859
    1876
    1864
    1862
    1861
    1879
    1862
    1863
    1860
    1881
    1861
    1869
    1859
    1880
    1862
    1862
    1862
    1882
    1863
    1862
    1859
    1875
    1861
    1866
    1859
    1880
    1861
    1862
    1861
    1866
    1861
    1861
    1859
    1874
    1866
    1876
    1860
    1877
    1862
    1865
    1872
    1880
    1862
    1872
    1859
    1873
    1861
    1860
    1860
    1875
    1863
    1863
    1872
    1880
    1859
    1864
    1862
    1867
    1862
    1862
    1859
    1876
    1860
    1863
    1872
    1871
    1863
    1864
    1861
    1867
    1864
    1862
    1862
    1875
    1862
    1862
    1873
    1874
    1874
    1868
    1860
    1878
    1866
    1863
    1873
    1874
    1860
    1864
    1874
    1870
    1862
    1869
    1860
    1880
    1863
    1862
    1861
    1874
    1864
    1865
    1863
    1874
    1861
    1871
    1858
    1872
    1862
    1864
    1859
    1870
    1860
    1871
    1863
    1882
    1863
    1878
    1861
    1873
    1862
    1862
    1861
    1876
    1861
    1863
    1862
    1871
    1863
    1869
    1859
    1876
    1864
    1861
    1860
    1873
    1862
    1869
    1863
    1882
    1864
    1871
    1861
    1876
    1864
    1862
    1861
    1873
    1864
    1863
    1862
    1866
    1861
    1869
    1860
    1883
    1862
    1862
    1863
    1880
    1863
    1865
    1860
    1881
    1866
    1870
    1861
    1872
    1862
    1864
    1859
    1874
    1862
    1865
    1861
    1866
    1862
    1868
    1861
    1881
    1865
    1864
    1861
    1880
    1861
    1864
    1859
    1873
    1862
    1868
    1860
    1876
    1861
    1881
    1861
    1880
    1863
    1876
    1863
    1871
    1864
    1870
    1858
    1873
    1863
    1863
    1860
    1871
    1862
    1866
    1860
    1875
    1863
    1865
    1860
    1866
    1864
    1867
    1861
    1881
    1862
    1863
    1863
    1880
    1862
    1863
    1859
    1881
    1864
    1865
    1858
    1872
    1862
    1864
    1861
    1881
    1861
    1863
    1861
    1882
    1864
    1871
    1861
    1873
    1865
    1864
    1859
    
  14. zackees commented on Nov 21, 2026

    @zackees
    Member

    Fixed in #5350, now merged to master.

    Root cause: the RMT5 driver (which the ESP32-S3 uses for legacy addLeds<NEOPIXEL, PIN>) reported BUSY for the entire transmission. FastLED.show() ends by waiting for every driver to reach READY or DRAINING, so each show() blocked for the full wire time plus the reset latch. That matches the ~1.86 ms you measured on 3.10.10. 3.10.3 returned immediately (led_strip_refresh_async). The driver now reports DRAINING once all strips are on the wire, so show() returns while RMT finishes the frame in the background.

    Measured on an ESP32-C6 forced onto the same RMT5 legacy path, replaying your sketch (35 LEDs, 5 ms show cadence):

    show() mean sequence time
    master before 1687 µs 2500–2507 ms
    after #5350 369 µs 2495 ms, every sequence

    There's no ESP32-S3 on our bench, so I'd be grateful if you could confirm on your board with current master.

    Note: show() is asynchronous again, as in 3.10.3. If a sketch cuts LED power or deep-sleeps immediately after show(), it should wait for the frame to finish first.

    A separate ~2.3 ms per-frame cost on the C6/P4 PARLIO default path is tracked in #5351.

  15. moved this from Triage to Done in FastLED Trackeron Nov 21, 2026
  16. added
    sanitized
    and removed on Nov 21, 2026
  17. nomakewan commented on Nov 21, 2026

    @nomakewan
    ContributorAuthor

    I have tested commit aac1367 as requested on my real ESP32-S3. The show() timing (in microseconds) is as follows:

    ESP-ROM:esp32s3-20210327
    Build:Mar 27 2021
    rst:0x15 (USB_UART_CHIP_RESET),boot:0x9 (SPI_FAST_FLASH_BOOT)
    Saved PC:0x40378e2e
    SPIWP:0xee
    mode:DIO, clock div:1
    load:0x3fce2820,len:0x1120
    load:0x403c8700,len:0xc00
    load:0x403cb700,len:0x30a0
    entry 0x403c88a4
    
    675
    568
    550
    545
    524
    551
    548
    552
    551
    547
    523
    544
    551
    539
    550
    546
    550
    540
    549
    545
    547
    543
    549
    548
    549
    530
    553
    545
    547
    550
    553
    537
    552
    546
    549
    547
    545
    532
    531
    547
    529
    549
    551
    544
    549
    545
    530
    551
    543
    546
    560
    551
    556
    534
    537
    549
    533
    540
    548
    543
    543
    547
    530
    531
    529
    545
    528
    538
    545
    544
    526
    541
    545
    543
    554
    548
    555
    547
    533
    549
    547
    536
    548
    541
    532
    550
    530
    547
    554
    534
    532
    549
    555
    540
    529
    541
    546
    540
    547
    542
    547
    545
    529
    540
    552
    543
    552
    534
    531
    546
    548
    547
    555
    550
    529
    546
    556
    550
    533
    532
    535
    546
    551
    552
    548
    537
    547
    549
    558
    548
    551
    547
    536
    549
    555
    552
    557
    550
    546
    547
    552
    547
    556
    543
    531
    551
    548
    546
    556
    533
    548
    547
    548
    547
    550
    545
    528
    544
    546
    531
    531
    545
    547
    552
    543
    543
    536
    546
    527
    544
    555
    534
    557
    552
    534
    546
    552
    553
    535
    541
    536
    548
    547
    547
    532
    540
    528
    550
    546
    540
    528
    538
    530
    546
    550
    535
    548
    545
    527
    541
    539
    548
    546
    540
    528
    458
    554
    543
    547
    537
    531
    532
    530
    541
    547
    540
    525
    544
    527
    546
    541
    542
    529
    536
    549
    544
    524
    552
    547
    538
    531
    542
    547
    550
    552
    550
    553
    543
    536
    551
    553
    549
    557
    544
    527
    552
    535
    546
    555
    543
    548
    550
    533
    541
    538
    552
    534
    547
    558
    553
    553
    553
    535
    555
    533
    534
    559
    543
    531
    541
    549
    551
    550
    541
    526
    548
    548
    544
    549
    541
    521
    547
    530
    538
    536
    542
    554
    550
    534
    538
    531
    548
    527
    547
    552
    540
    553
    544
    549
    561
    555
    540
    552
    547
    540
    545
    542
    540
    546
    546
    545
    547
    532
    542
    551
    527
    529
    549
    531
    547
    547
    530
    529
    547
    533
    543
    553
    528
    529
    552
    530
    538
    551
    525
    528
    545
    550
    531
    550
    548
    529
    550
    555
    541
    535
    550
    553
    550
    538
    538
    552
    554
    553
    551
    557
    542
    557
    549
    535
    551
    536
    535
    554
    544
    530
    548
    535
    530
    546
    543
    525
    550
    534
    541
    556
    554
    533
    550
    534
    536
    536
    553
    536
    553
    554
    544
    557
    547
    554
    551
    536
    546
    555
    541
    537
    545
    535
    548
    557
    549
    530
    545
    537
    542
    548
    544
    550
    548
    536
    531
    554
    552
    527
    550
    550
    539
    550
    548
    528
    556
    535
    535
    531
    549
    526
    551
    533
    549
    534
    547
    529
    553
    550
    529
    559
    546
    527
    548
    554
    537
    551
    544
    526
    544
    552
    539
    547
    544
    535
    543
    533
    528
    551
    545
    530
    546
    531
    530
    550
    545
    526
    550
    531
    551
    553
    545
    530
    545
    531
    532
    548
    540
    556
    551
    536
    532
    545
    545
    533
    552
    537
    542
    553
    545
    528
    552
    537
    535
    551
    548
    526
    545
    548
    547
    554
    544
    527
    553
    531
    542
    531
    543
    525
    547
    534
    541
    534
    550
    526
    544
    551
    537
    554
    546
    529
    550
    552
    544
    554
    546
    532
    549
    528
    539
    553
    548
    527
    548
    548
    541
    552
    545
    527
    547
    547
    541
    555
    544
    554
    546
    555
    545
    557
    553
    534
    553
    555
    547
    534
    548
    533
    554
    534
    548
    560
    551
    557
    551
    548
    550
    551
    533
    525
    547
    539
    538
    550
    549
    527
    550
    551
    538
    556
    549
    523
    547
    552
    540
    531
    543
    556
    549
    550
    529
    550
    546
    529
    549
    537
    534
    549
    546
    530
    550
    549
    531
    555
    544
    

    This is indeed a tremendous improvement, dropping the slowdown from 17x slower than 3.10.3 to 5x slower than 3.10.3. However, it is still 5x slower than 3.10.3. It may not seem like much, but for animations that have tight timings it would be nice to be able to reclaim the speed that 3.10.3 and earlier versions of FastLED provided.

  18. added and removed
    sanitized
    on Nov 21, 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

    deferredsecurity: unscreened-contentstatus: triagetype: bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions