Skip to content

Replace object queryKey by value-type QueryKey #376

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

Merged
merged 3 commits into from
Apr 17, 2025

Conversation

SergeiPavlov
Copy link
Collaborator

MethodInfo is a key of Domain.QueryCache frequently.

Use Metadata/ModuleHandle as parts of key for efficient hash function

Copy link

@snaumenko-st snaumenko-st left a comment

Choose a reason for hiding this comment

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

Good finding!

@snaumenko-st snaumenko-st requested a review from Copilot April 17, 2025 20:15
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

Orm/Xtensive.Orm/Orm/Internals/CompiledQueryRunner.cs:224

  • [nitpick] Consider renaming 'keyParts' to 'queryKeyComponents' to improve clarity regarding its use.
queryKey = new(keyParts.Key, keyParts.MetadataToken, keyParts.ModuleHandle, domainConfig.ShareStorageSchemaOverNodes && domainConfig.PreferTypeIdsAsQueryParameters ? null : session.StorageNodeId);

@SergeiPavlov SergeiPavlov merged commit c3b984b into master-servicetitan Apr 17, 2025
5 checks passed
@SergeiPavlov SergeiPavlov deleted the QueryCache branch April 17, 2025 20:56
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