Merged
Conversation
a981348 to
399861e
Compare
efc60e1 to
b35bc2a
Compare
vonzshik
reviewed
Mar 2, 2023
Contributor
vonzshik
left a comment
There was a problem hiding this comment.
Looks good, though I'm not sure whether the casts are necessary.
vonzshik
reviewed
Mar 3, 2023
16 tasks
roji
approved these changes
Mar 3, 2023
Member
roji
left a comment
There was a problem hiding this comment.
Looks, and not as complicated as I feared it might be 😅
Some thoughts:
- We can make arrays as a whole opt-in via NpgsqlSlimDataSourceBuilder (#4965). At that point reducing the array overhead becomes less important, but this significant size reduction for those who do opt in is still definitely nice to have.
- On the other hand, this adds some overhead for arrays (concurrent dictionary lookup per array operation, more virtual calls per array element). It could be claimed that if you opt into arrays, you'd rather have them faster and are willing to pay a bit of size for that; though I'm guessing the runtime overhead added here is probably negligible (maybe a benchmark would help).
- We've been discussing redoing/changing type handlers in general because the current design is problematic/convoluted (e.g. more in the direction of Slon). If we do that, then the churn here may not be worth it.
To be clear I'm totally fine with merging this (though a quick benchmark would be nice), just pointing out some points.
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.
Through the eye of the needle