remove unmaintained WLED_SAVE_RAM#5752
Merged
Merged
Conversation
On 8266, compiling with WLED_SAVE_RAM increases flash size by 1.2KB, while reducing static RAM by 20KB only. Plus it reduves the size of the transition struct by 48 bytes (from 80 to 32). In the other side, the WLED_SAVE_RAM special code is not maintained, it introduces a slowdown, and its largely untested with the latest codebase. I suggest to remove this micro-optimization.
Contributor
Walkthrough
ChangesWLED_SAVE_RAM storage unification
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant SegmentStartTransition
participant Transition
participant SegmentBeginDraw
SegmentStartTransition->>Transition: loadPalette(_palT, palette)
SegmentBeginDraw->>Transition: read _palT
SegmentBeginDraw->>SegmentBeginDraw: nblendPaletteTowardPalette(_currentPalette, _palT)
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
DedeHai
approved these changes
Jul 21, 2026
softhack007
commented
Jul 21, 2026
| RgbConnected = c3; | ||
| } | ||
| } __attribute__ ((aligned(1), packed)) udp_port_t; | ||
| WLED_GLOBAL udp_port_t udp _INIT_N(({21234, 65506, 19446, 0, false, false, false})); |
Member
Author
There was a problem hiding this comment.
Just to prove me right 😜 , this line actually has a bug - 21234 (udp port) should be 21324 (middle 2<->3 swapped)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On 8266, compiling with WLED_SAVE_RAM increases flash program size by 1.2KB, while reducing static RAM by 20 bytes only. Plus it reduces the size of the Segment::Transition struct by 48 bytes (from 80 to 32), by avoiding a separate palette for blending.
On the other side, the WLED_SAVE_RAM special code is not maintained (corner case, needs a special build flag to activate), and its largely untested with the latest codebase.
I suggest removing this micro-optimization, for the sake of maintainability, and for reducing special cases alternate implementations.