Repository navigation
perf: define getBaseSettingsList() once - #69
Merged
Merged
Conversation
As an inline header function, every file that inlined it kept a private ~8 KB copy of the settings-list builder lambda. One definition in SettingsList.cpp keeps a single copy. Same change as CrossDink f08b7b3. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XgLRarbAmBVepTPKCK7mgd
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.
Before:
getBaseSettingsList()was aninlinefunction insrc/SettingsList.h. Every file that inlined it kept a private ~8 KB copy of the settings-list builder lambda, and the C3 firmware carried two of them.After: one definition in the new
src/SettingsList.cpp, so the firmware has a single builder lambda. Behavior is unchanged: the body moved verbatim, still builds the list once into a function-local static, and reserves the same capacity.How: the function body moves from the header into a
.cpp, and the header keeps only the declaration. This is the same change as CrossDink f08b7b3.Sizes, C3
default, vs development 76473c2:getBaseSettingsList()::{lambda()#1}::operator()had two copies before (8,078 B + 8,200 B) and has one after (8,546 B). The duplicatedstd::functionhandlers are gone too.Verify on hardware: open Settings and check each category lists the same entries; change a setting, reboot, and confirm it persisted. The web settings page should list the same settings.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XgLRarbAmBVepTPKCK7mgd
Generated by Claude Code