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

Avoid unnecessary creation of Both / Then when BlockedRequests == Empty #494

Merged

Conversation

kyri-petrou
Copy link
Collaborator

Currently we compose the BlockedRequests without checking if the RHS BlockedRequests object is an Empty. If it's an Empty then we can avoid composing them, therefore reducing object allocations and the time required to decompose the requests later one.

This change mostly affects queries that contain at least some entries that were taken from the Cache. Based on the benchmarks, it shows up to 10% improvement for such queries

@kyri-petrou kyri-petrou merged commit a57ea1d into zio:series/2.x Jul 1, 2024
21 checks passed
@kyri-petrou kyri-petrou deleted the optimize-for-cached-requests branch July 1, 2024 05:21
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.

1 participant