Repository navigation
refactor(channels): extract Channel::showPixels disabled-driver error into FL_NO_INLINE helper (#2773 follow-up) - #2851
Conversation
|
Linter diff in the way? Review this PR in Change Stack to focus on meaningful changes and expand context only when needed. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PR extracts the DISABLED-driver error diagnostic logic from ChangesDisabled driver error diagnostic helper
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
… into FL_NO_INLINE helper (#2773 follow-up to #2832) The two-branch `FL_ERROR(... << ...)` chain in `Channel::showPixels` that fires when a bound driver has been runtime-disabled (typically by `FastLED.setExclusiveDriver<OtherBus>()`) was still inlined into the hot path. The branch is one-shot (`mDisabledDriverWarned`) and unreachable in the steady state, so the ~10 `operator<<` instantiations were pure cold-path bloat sitting in showPixels' prologue/epilogue. Move into an anonymous-namespace helper marked `FL_NO_INLINE` (per the `bare_noinline_checker` introduced in #2830, not bare `__attribute__((noinline))`), matching the shape the maintainer adopted for `resolveDynamicDriver()` in PR #2830. This is the leftover piece from PR #2832, which the maintainer flagged in the closing comment as worth a follow-up: > The two pieces this PR has that #2830 didn't (emitDisabledDriverError > and the #if FASTLED_HAS_DBG gate on ChannelManager::addDriver's > capStr builder) are small enough (~couple hundred bytes) that a > rebase round trip isn't worth the churn vs just reopening them in > a follow-up. The `addDriver` capStr DBG gate piece of #2832 was independently shipped by the maintainer as iter 6 (commit `ea96b373b5`, `perf(channels): gate addDriver capStr builder behind FASTLED_HAS_DBG (#2773 iter 6)`), so this rebase drops that half and keeps only the unique `emitDisabledDriverError` extraction. Refs #2773. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
9c52645 to
5037f78
Compare
Summary
Rebased onto master to drop the now-duplicate piece. Original PR had two parts; the maintainer landed half of it in parallel as iter 6 (commit ea96b37,
perf(channels): gate addDriver capStr builder behind FASTLED_HAS_DBG), so only the uniqueemitDisabledDriverErrorextraction remains.What's left
The two-branch
FL_ERROR(... << ...)chain inChannel::showPixelsthat fires when a bound driver has been runtime-disabled (typically byFastLED.setExclusiveDriver<OtherBus>()) was still inlined into the hot path. The branch is one-shot (mDisabledDriverWarned) and unreachable in the steady state, so the ~10operator<<instantiations were pure cold-path bloat sitting inshowPixels' prologue/epilogue.Moves into an anonymous-namespace helper marked
FL_NO_INLINE(per thebare_noinline_checkerintroduced in #2830, not bare__attribute__((noinline))), matching the shape the maintainer adopted forresolveDynamicDriver()in PR #2830.The closing comment on the original #2832 explicitly flagged this piece as worth a follow-up:
Verification
ci/lint_cpp/run_all_checkers.py src/fl/channels/channel.cpp.hppclean.ci/lint_cpp/bare_noinline_checker.pyclean — usesFL_NO_INLINE(the maintainer's feat(stl): FL_NO_INLINE portable macro + cold-helper split for showPixels (#2773 item 2.1) #2830 macro), not bare__attribute__((noinline)).Refs #2773.
🤖 Updated by Claude Code after rebase.
Summary by CodeRabbit