Repository navigation
Optimize ViewReader, NamedTupleParser, and Tuple for compile time and object size - #61
Closed
clockblocker wants to merge 1 commit into
Closed
clockblocker wants to merge 1 commit into
clockblocker wants to merge 1 commit into
Conversation
clockblocker
force-pushed
the
cli-compile-time-and-cache
branch
from
November 27, 2026 07:26
cdefb0f to
c26fc2d
Compare
clockblocker
force-pushed
the
optimize-view-reader-wrapper-peeling
branch
from
November 27, 2026 07:27
4270a29 to
f0531bf
Compare
Owner
Author
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.
Reduces template-instantiation count, object-file size, and DWARF debug info bloat for large reflected structs (such as 80+ field CLI configs):
include/rfl/parsing/peel_transparent_wrappers.hpp: peels pure metadata/annotation wrappers (TransparentWrapper,Description,Deprecated,Short,Positional,Rename,DefaultVal) before callingParser::read, so fields with the same underlyingCoreTypeshare a singleread_field_coreinstantiationmove_assign_fieldandplacement_move_fieldout ofViewReader*class scope so instantiations don't encode the enclosingNamedTuplein mangled symbol names or DWARF infoconstexprsorted field-name table with binary search inViewReaderWithDefaultNamedTupleParser::handle_one_missing_fieldon_defaults_constructedso default-constructed structs skip missing optional/DefaultValcodegenrfl::Tupleaccessors to cut DWARF bloat and reuses the non-constto_view<S>instantiation incli::usageStacked on
cli-compile-time-and-cache(#60). Verified with ASan + UBSan across all CLI tests plus JSONtest_wrapped_optionals_and_defaultsandtest_tuple.