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

Improve field wrapper performance #2051

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

kyri-petrou
Copy link
Collaborator

Calling Clock.nanoTime extracts the clock from the environment, which is not as fast as having the value available during method invocation. While this is fine in most cases, it can be problematic in FieldWrappers since we might be wrapping 100's-1000's of fields per query execution.

Also, I found that it's slightly faster when we create the effect UQuery[Long] only once per query execution rather on each field invocation, although the difference is not that significant. I can pass a Clock to the method instead if we think that's clearer

@kyri-petrou kyri-petrou merged commit ee2d9e9 into series/2.x Dec 19, 2023
10 checks passed
@kyri-petrou kyri-petrou deleted the improve-field-wrapper-performance branch December 19, 2023 03:27
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