-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #105, remove SC_ENABLE_GROUP_COMMANDS option #106
Conversation
Note - I also ran a quick test to see what happened if this option was set
This is why we avoid conditional code. |
Comparison of code size with option set true:
And option set false (unit test disabled):
So we are talking about 3.6kb of code size and a few bytes of data saved by disabling this feature. With this PR this will be permanently enabled. |
Looked up the requirements for group commands and they aren't marked optional (although they don't follow best practices for avoiding "compound" requirements). Note I didn't find requirements for the enable/disable group commands. See #107. |
@jphickey - could you add the settings you used (optimization level, did you strip debug?) and platform for the code size results? |
db6fb35
to
2270da4
Compare
This was always set true and the software has not been validated with the option set to false. Turning this off only removed a few small functions and the complexity (and violation of coding standard) does not justify it as an option.
2270da4
to
016d971
Compare
Note - Force pushes above are just to tweak UT stubs to avoid a merge conflict with my next PR. |
@skliper - the size test was done with a vanilla Linux debug build using gcc 12. If I do a "release" build instead (thus -O3 optimization and binaries w/o debug info), the text numbers get a bit smaller: Enabled:
Disabled:
If the code size was the impetus for making this compile-time optional, then there are other ways to make the code smaller that don't create a validation issue. |
@jphickey Agree completely w/ the change and general move away from compile time ifdefs, just helps to know what settings were used when sizes are reported. |
Checklist (Please check before submitting)
Describe the contribution
This was always set true and the software has not been validated with the option set to false. Turning this off only removed a few small functions and the complexity (and violation of coding standard) does not justify it as an option.
Fixes #105
Testing performed
Build and run all tests
Expected behavior changes
None, assuming code was always built with this option set
true
anywaySystem(s) tested on
Debian
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.