Compile swig message wrappers with lower optimization#1355
Closed
schaubh wants to merge 2 commits into
Closed
Conversation
Compile the generated messaging SWIG wrapper targets with reduced optimization in release-style builds. These generated translation units dominate clean build time, and lowering optimization on the wrappers avoids spending compiler effort where runtime performance is not expected to be critical. Keep the change target-local so Basilisk simulation and FSW source modules continue to use the normal project optimization settings.
120d2c8 to
133d0a7
Compare
Contributor
Author
|
While the compile times did increase by about 33%, the resulting time it took to run all |
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.
Description
This PR improves clean build time by reducing optimization only for the generated messaging SWIG wrapper targets. These generated wrapper translation units are expensive for the compiler to optimize and are not expected to be runtime-critical compared with Basilisk simulation and FSW source modules.
The change is intentionally target-local: normal Basilisk source modules continue to use the existing project optimization settings, while the generated messaging wrapper modules use lower optimization for release-style builds.
In local testing, a clean build improved from approximately 3:51 to 2:33.
Verification
Validated with a full rebuild and the messaging unit test suite:
The messaging unit tests passed:
No automated tests were added because this is a build-system optimization that should preserve generated messaging behavior rather than introduce new runtime functionality.
Documentation
Added a release-note snippet describing the build-time improvement:
No user-facing documentation was otherwise invalidated.
Future work
If additional build-time reductions are desired, follow-up work could profile other generated wrapper targets or evaluate compiler/cache settings. The previous batching approach for messaging SWIG modules was tested separately and increased clean build time, so this PR keeps the safer per-target structure.