Skip to content
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

Optimize unnecessary .map when handling nullable fields #2044

Merged
merged 1 commit into from
Dec 17, 2023

Conversation

kyri-petrou
Copy link
Collaborator

There are a few micro-optimizations in this PR, but the main one is that we avoid the extra .map for nullable object fields. This results in roughly ~10% in our execution benchmarks, although that's fairly biased as all ZQuery fields are nullable

Comment on lines +186 to +189
q.foldQuery(
handleError(_).map((name, _)),
v => ZQuery.succeed((name, v))
)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TL;DR this is the main optimization

@kyri-petrou kyri-petrou merged commit 81d9b9d into series/2.x Dec 17, 2023
10 checks passed
@kyri-petrou kyri-petrou deleted the more-executor-optimizations branch December 17, 2023 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants