Skip to content

fix(parlio): reduce C6 waveform lookup flash and RAM - #4749

Merged
zackees merged 1 commit into
masterfrom
fix/memory-4740-esp32c6
Oct 7, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/memory-4740-esp32c6

Conversation

@zackees

@zackees zackees commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Share the mutually exclusive Wave3/Wave8 tables in PARLIO and build the nibble table only as a local during Wave8 initialization.
  • Preserve the existing high-performance byte lookup encoder, supported widths, SPI path, timing and ISR algorithms.
  • Add captured-waveform regression coverage for repeated mode switches and a scoped default C6 bloat budget.

Refs #4740, #4737. Child closure follows landed-master verification and the cumulative performance comment; the meta issue stays open.

Local measurements

Same checkout, same cached C6 board project, fbuild 2.5.37, Arduino-ESP32 3.3.5 / IDF 5.5.1, GCC 14.2.0, normal board flags. Starting master e60f4fc; historical tag 3.10.3 at 20667c3. Historical generated stub uses ::delay(0) for compatibility. No worktrees.

workload 3.10.3 flash / RAM starting master candidate saving
published Blink 285392 / 14924 360688 / 18724 360494 / 18628 194 / 96
controlled GPIO3, one RGB LED, no Serial 285392 / 14924 360422 / 18708 360228 / 18612 194 / 96

The remaining gap versus 3.10.3 is 75102 / 3704 bytes for published Blink and 74836 / 3688 for the controlled workload. This is a measured reduction, not a claim of historical parity.

Image-flash bloat metric falls 403928 → 403818; the new 403818 ceiling fails the starting master report and passes the candidate. Attributed RAM remains 29888 because sized symbol reporting omits the singleton storage; the <=2048-byte encoding-storage assertion guards this change separately (previous combined storage was 2144, RED). Board totals demonstrate the 96-byte actual static RAM reduction.

Validation

  • Matched fbuild builds and bloat reports for 3.10.3/master/candidate, published and controlled workloads.
  • PARLIO full-path debug/sanitizer tests passed, including byte-for-byte DMA waveform across Wave3/Wave8/Wave3/Wave8.
  • bash test --cpp passed: 319/319 unit targets; cached examples validated by the wrapper.
  • bash lint and git diff --check passed; manual repository code review completed.
  • Logging audit: operational traces already use FL_LOG_PARLIO; remaining warnings describe invalid configuration/allocation/SDK failures. No fl::printf logging calls in PARLIO. Errors preserved.

All platform validation is local. No CI Full invocation.

Summary by CodeRabbit

  • Improvements
    • Reduced memory use for PARLIO waveform encoding on ESP32 platforms, helping lower the resources required by default configurations.
  • Bug Fixes
    • Preserved waveform output when switching between supported PARLIO timing modes.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: FastLED/FastLED/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c469017e-adf8-451e-b200-040e69dec865
📥 Commits

Reviewing files that changed from the base of the PR and between e60f4fc and 333714f.

📒 Files selected for processing (5)
  • agents/tasks/todo.md
  • src/platforms/esp/32/drivers/parlio/parlio_engine.cpp.hpp
  • src/platforms/esp/32/drivers/parlio/parlio_engine.h
  • tests/data/esp32c6_bloat_budget.json
  • tests/platforms/esp/32/drivers/parlio/parlio_driver.cpp

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The PARLIO engine now stores its active Wave3 or Wave8 lookup table in a shared, size-limited union. A regression test alternates between both modes. The changes also add ESP32-C6 budget measurements and update ESP32 task status.

Changes

PARLIO lookup storage

Layer / File(s) Summary
Bound and use active lookup storage
src/platforms/esp/32/drivers/parlio/parlio_engine.h, src/platforms/esp/32/drivers/parlio/parlio_engine.cpp.hpp
Replaces separate lookup-table members with a union limited to 2048 bytes. Wave3 and Wave8 initialization constructs the active member in place, and the encoding paths use that member.
Validate alternating modes and record ESP32 measurements
tests/platforms/esp/32/drivers/parlio/parlio_driver.cpp, tests/data/esp32c6_bloat_budget.json, agents/tasks/todo.md
Adds a regression test that alternates Wave3 and Wave8 transmissions and checks the encoded DMA bytes and driver readiness. Records ESP32-C6 Blink flash and RAM measurements and updates ESP32-C3 and ESP32-C6 task status.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 33371

This change shares lookup-table storage between the two PARLIO waveform modes to save flash and RAM. No concrete defect was found, and a test checks that switching modes keeps the encoded output unchanged.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: reducing ESP32-C6 PARLIO waveform lookup flash and RAM usage.
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 3 files. (2 skipped: 2 u…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@zackees
zackees merged commit 8d6ed12 into master Oct 7, 2026
120 checks passed
@zackees
zackees deleted the fix/memory-4740-esp32c6 branch November 5, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant