Skip to content

Conversation

@AlexUstinov
Copy link
Contributor

Main goal of this PR is to eliminate array cloning when it is returned from inside a class as a property value. The purpose of cloning is to protect internal array from modifications so we can just wrap this instance to read only collection instance instead of cloning.

…ion of unnecessary array copies.

# Conflicts:
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/IncludeProvider.cs
Copy link
Contributor

@alex-kulakov alex-kulakov left a comment

Choose a reason for hiding this comment

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

SelectProvider and IncludeProvider classes' constructors had arrays of integer as input parameter, now IncludeProvider has same constructor with new type of the parameter that used to be array of integer but SelectProvider has got an additional constructor. Apparently, int[] can cast to IReadOnlyList<int, why use it in one case and not use in in another?

…copy

# Conflicts:
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/IncludeProvider.cs
#	Orm/Xtensive.Orm/Tuples/TupleDescriptor.cs
Copy link
Contributor

@alex-kulakov alex-kulakov left a comment

Choose a reason for hiding this comment

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

Now seems to be OK to merge

@alex-kulakov alex-kulakov merged commit a724897 into DataObjects-NET:master Apr 15, 2020
@AlexUstinov AlexUstinov deleted the no-array-copy branch April 15, 2020 20:05
alex-kulakov pushed a commit that referenced this pull request Sep 10, 2020
…d to thread contention and to lock convoy issue (#16)
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