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

Compute dates in DefaultKeyResolver once #60051

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

martincostello
Copy link
Member

Compute dates in DefaultKeyResolver once

Compute dates in DefaultKeyResolver once per LINQ query.

Description

Compute the maximum activation and creation DateTimeOffset for DefaultKeyResolver once before executing a LINQ query, rather than for each evaluation of where in the query.

Spotted while looking at #60049.

Compute the maximum activation and creation `DateTImeOffset` for `DefaultKeyResolver` once before executing a LINQ query, rather than for each evaluation of `where`.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-dataprotection Includes: DataProtection label Jan 27, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jan 27, 2025
Copy link
Member

@captainsafia captainsafia left a comment

Choose a reason for hiding this comment

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

Great change, @martincostello! Improves the readability of this code as well. 😄

@captainsafia captainsafia merged commit 6060ad1 into dotnet:main Jan 28, 2025
27 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview2 milestone Jan 28, 2025
@martincostello martincostello deleted the compute-dates-once branch January 28, 2025 07:38
captainsafia pushed a commit that referenced this pull request Feb 11, 2025
Compute the maximum activation and creation `DateTImeOffset` for `DefaultKeyResolver` once before executing a LINQ query, rather than for each evaluation of `where`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dataprotection Includes: DataProtection community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants