perf: Allow fields to be skipped when the schema defines an member that is not found on the target type#367
Open
PauloHMattos wants to merge 2 commits intoch-robinson:mainfrom
Open
Conversation
…at is not found on the target type
Contributor
Author
dstelljes
reviewed
Jan 7, 2026
Member
dstelljes
left a comment
There was a problem hiding this comment.
Sorry for the wait! This looks good; just one concern about custom cases
Comment on lines
+69
to
+71
| // field skipping (must be first): | ||
| builder => new BinarySkipFieldDeserializerBuilderCase(builder), | ||
|
|
Member
There was a problem hiding this comment.
Since this needs to be first, it might be best to handle SkipField directly in BuildExpression rather than implementing it as a case. Projects with custom cases tend to Prepend onto the defaults (like in our examples)
Contributor
Author
There was a problem hiding this comment.
Just pushed the change to handle this directly in BuildExpression. Let me know if is all good now
Contributor
Author
|
@dstelljes any feedback on this? |
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.
Implements the approach suggested in #342 (comment)
to optimize deserialization when the schema contains more fields than the target type.
I couldn’t think of a reasonable way to write tests that ensure the skip-field code path is executed. If you have any suggestions, I’m all ears.
If I’m missing something, please let me know and I’ll address it right away.
Closes #342