Skip to content

Optimize PersistRequest constructor #351

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 1 commit into from
Feb 6, 2025

Conversation

SergeiPavlov
Copy link
Collaborator

@SergeiPavlov SergeiPavlov commented Feb 5, 2025

These bindings are always "normalized" into HashSet<>
No need to create intermediate list

Also:

  • Remove NormalizeBindings() function, not used anymore.
  • Remove unused field SqlCompilationResult.typeIdRegistry (created some time ago for our Shared Cache implementation)

@SergeiPavlov SergeiPavlov merged commit 70f87dc into master-servicetitan Feb 6, 2025
4 checks passed
@SergeiPavlov SergeiPavlov deleted the ParameterBinding branch February 6, 2025 00:40
@@ -18,6 +18,8 @@ namespace Xtensive.Orm.Providers
/// </summary>
public sealed class PersistRequest
{
private static readonly IReadOnlySet<PersistParameterBinding> EmptyBindings = new HashSet<PersistParameterBinding>();

Choose a reason for hiding this comment

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

FrozenSet.Empty ?

@@ -20,16 +16,18 @@ namespace Xtensive.Orm.Providers
/// </summary>
public sealed class QueryRequest : IQueryRequest
{
private static readonly IReadOnlySet<QueryParameterBinding> EmptyBindings = new HashSet<QueryParameterBinding>();

Choose a reason for hiding this comment

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

FrozenSet.Empty ?

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.

3 participants