Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
a2a80db
Compile for net6 with no warnings
AlexUstinov Dec 15, 2021
9449267
Remove not used code from tuple transform
AlexUstinov Dec 23, 2021
e437d17
Get rid of ReadOnlyTransform as it is not used
AlexUstinov Dec 23, 2021
4062145
Refactor MapTransform class
AlexUstinov Dec 23, 2021
cbc605c
Directly call specific Apply method to avoid params allocations
AlexUstinov Dec 23, 2021
ea983d0
Convert the TransoformedTuple abstract class to a marker interface
AlexUstinov Dec 23, 2021
0fd5a9d
Improve the MapTransformTuple1 code
AlexUstinov Dec 23, 2021
376ca61
Improve code of the MapTransformTuple3 class
AlexUstinov Dec 23, 2021
4beb25a
Improve code of the MapTransformTuple class
AlexUstinov Dec 23, 2021
4e268b6
Replace FixedList3 with internal FixedReadOnlyList3
AlexUstinov Dec 23, 2021
1a0b3a1
Rename TypedTransform property to TupleTransform
AlexUstinov Dec 23, 2021
40b5c3f
Introduce better solution for readonly access to PackedFieldDescripto…
AlexUstinov Dec 24, 2021
5213075
Simplify CombineTransform implementation
AlexUstinov Dec 24, 2021
fed8a0b
Convert TupleTransformBase to an intrface
AlexUstinov Dec 24, 2021
9b0ed84
Use composition instead of inheritance for the CombineTransform
AlexUstinov Dec 24, 2021
4107875
Use composition instead of inheritance for the SegmentTransform
AlexUstinov Dec 24, 2021
4a67438
Remove unused methods from the MapTransform class
AlexUstinov Dec 24, 2021
db7efb0
Introduce SingleSourceMapTransform transformation
AlexUstinov Dec 28, 2021
4eb72a0
Do not create map for the SegmentTransform
AlexUstinov Dec 28, 2021
bd7fc84
Improve SegmentTransform.Apply method implementation
AlexUstinov Dec 28, 2021
3280bbb
Improve SegmentTransform constructor implementation
AlexUstinov Dec 28, 2021
f48d39f
Improve MapTransform constructor implementation
AlexUstinov Dec 28, 2021
14690cb
Rename the CombineTransform class to the ConcatTransform
AlexUstinov Dec 28, 2021
10f9388
Do not create map for the ConcatTransform
AlexUstinov Dec 28, 2021
3fe1b5c
Do not use MapTransform to inject primary keys to the entity tuples
AlexUstinov Dec 29, 2021
f2a176e
Do not use MapTransform to create seek keys in the EntitySetBase
AlexUstinov Dec 29, 2021
283d37e
Delete the MapTransform class and its dependencies
AlexUstinov Dec 29, 2021
5a0b213
Rename SingleSourceMapTransform class to MapTransform
AlexUstinov Dec 29, 2021
05a94e1
Get rid of the TransformedTuple<TTransform> base class
AlexUstinov Dec 29, 2021
486dfd4
Get rid of the redundand ITupleTransform interface
AlexUstinov Dec 29, 2021
d66ccaf
Add argument checks to the ConcatTransform and SegmentTransform const…
AlexUstinov Dec 29, 2021
de82753
Remove redundand comment
AlexUstinov Dec 29, 2021
a0f01be
Change MapTransform.ToString implementation
AlexUstinov Dec 29, 2021
9542f44
Remove excessive MapTransform usage in the CalculateProvider
AlexUstinov Dec 29, 2021
e2c24ed
Remove excessive MapTransform usage in the RowNumberProvider
AlexUstinov Dec 29, 2021
6ff76ff
Remove excessive MapTransform usage in the AggregateProvider
AlexUstinov Dec 29, 2021
64276ac
Remove excessive MapTransform usage in the OrderProviderBase
AlexUstinov Dec 29, 2021
f802349
Remove excessive MapTransform and ConcatTransform usage from the Incl…
AlexUstinov Dec 29, 2021
8c5fcef
Explicitly turn off connection encription for the testing purposes
AlexUstinov Dec 30, 2021
98d418a
Clean dead usings in the files related to the Xtensive.Tuples.Transfo…
AlexUstinov Jan 11, 2022
435d1d3
Get rid of virtual method calls in the Provider descendant constructors
AlexUstinov Jan 22, 2022
dd5f3af
Simplify Provider class code
AlexUstinov Jan 27, 2022
0835f37
Simplify code of the ExecutableProvider class
AlexUstinov Jan 27, 2022
7840f5c
Remove remaining argument checks in providers hierarchy
AlexUstinov Jan 27, 2022
6e1d47c
Merge branch '7.1' into tuple-transform-refactoring
alex-kulakov Mar 26, 2026
18a8a60
Organizational changes of building provider headers being in region, …
alex-kulakov Mar 26, 2026
c23c81e
Rse.Providers.Provider validates header and sources for not having nulls
alex-kulakov Mar 26, 2026
63ebab5
Caching IPreCompiler wrappers for rewriters
alex-kulakov Mar 26, 2026
022c688
Fix merge error of wrong index of calculated column in IncludeProvide…
alex-kulakov Mar 27, 2026
99ff9c5
Improved Header building for certain providers
alex-kulakov Mar 26, 2026
e7961ae
No Enumerable.Last() calls
alex-kulakov Mar 27, 2026
9d9fb2f
Remove changelog file of 7.1 branch
alex-kulakov Mar 30, 2026
db0a4e1
Merge branch '7.2' into tuple-transform-refactoring
alex-kulakov Mar 30, 2026
6bbb6dc
Merge branch 'master' into tuple-transform-refactoring
alex-kulakov Mar 30, 2026
799812d
Merge branch 'master' into tuple-transform-refactoring
alex-kulakov Apr 6, 2026
8cdffe7
Removed unused class
alex-kulakov Apr 7, 2026
3bdded4
Revert "Caching IPreCompiler wrappers for rewriters"
alex-kulakov Apr 7, 2026
4a27b18
Merge branch 'master' into tuple-transform-refactoring
alex-kulakov Apr 8, 2026
b8175f0
Add EntitySet tests to check case of complex keys
alex-kulakov Apr 9, 2026
89af35b
No TupleDescriptor.FieldTypes array usage from outside the type
alex-kulakov Apr 9, 2026
e8e9b33
Add some tests for SegmentTransform and ConcatTransform
alex-kulakov Apr 13, 2026
eff8897
ConcatTransform doesn't hold original descriptors just for ToString()…
alex-kulakov Apr 13, 2026
961f37f
Made TupleDescriptor's fieldTypes readonly field
alex-kulakov Apr 14, 2026
cf82f3c
No struct checks for default for internal usage
alex-kulakov Apr 14, 2026
0201d46
Avoid complicated arithmetics API for basic operation
alex-kulakov Apr 15, 2026
c4f82ad
Use direct lengths of array instead of Count property
alex-kulakov Apr 16, 2026
7728009
A bit faster parameter validation
alex-kulakov Apr 16, 2026
d8d8f29
Additional tests of TupleDescriptor
alex-kulakov Apr 16, 2026
f3f1763
Improve changelog
alex-kulakov Apr 17, 2026
4faebd0
Merge branch 'master' into tuple-transform-refactoring
alex-kulakov Apr 20, 2026
cbf53e2
Merge branch 'master' into tuple-transform-refactoring
alex-kulakov Apr 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions ChangeLog/7.2.2-dev.txt

This file was deleted.

4 changes: 4 additions & 0 deletions ChangeLog/7.3.0-Beta-1-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
[main] Removed obsolete member Values of SqlInsert type
[main] Removed obsolete methods GetSingleConstructor/GetSingleConstructorOrDefault of TypeHelper type
[main] Removed obsolete constant WellKnown.MaxNumberOfConditions, use DefaultMaxNumberOfConditions instead
[main] Tuple transformation heavily refactored, many types from Xtensive.Tuples.Transform removed, renamed or turned to internal
[main] Collection FixedList3 is removed
[main] Xtensive.Orm.Rse.Providers.Provider descendants no longer build RecordSetHeader on initialization via virtual method
[main] Many compilable providers build headers more easily with static methods
[firebird] Switch to .NET8/.NET10-only support, nuget packages actualized
[firebird] Support for Firebird 2.5 ended due to end-of-life state
[mysql] Switch to .NET8/.NET10-only support, nuget packages actualized
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<IncludeSymbols Condition="$(GeneratePackageOnBuild) == 'true'">true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<ContinuousIntegrationBuild>false</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// Created: 2011.05.22

using System.Security.Cryptography;
using System.Text;
using Xtensive.IoC;

namespace Xtensive.Orm.Security.Cryptography
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,11 @@ private static Stream GetLibraryStream()
private static string GetLibraryHash()
{
using (var hashProvider = SHA1.Create()) {
//hashProvider.Initialize();
ReadOnlySpan<byte> hashRaw;
using (var stream = GetLibraryStream()) {
hashRaw = hashProvider.ComputeHash(stream);
}
return new StringBuilder().AppendHexArray(hashRaw[..8]).ToString();
hashProvider.Initialize();
using (var stream = GetLibraryStream())
hashProvider.ComputeHash(stream);
var hash = hashProvider.Hash.Take(8).ToArray();
return new StringBuilder().AppendHexArray(hash).ToString();
}
}

Expand Down
109 changes: 0 additions & 109 deletions Orm/Xtensive.Orm.Tests.Core/Tuples/Transform/CutInTransformTest.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public class MapTransformTest
{
public void MainTest()
{
Xtensive.Tuples.Tuple source = Tuple.Create(1);
MapTransform transform = new MapTransform(true, TupleDescriptor.Create<byte, int, string>(), new[] {-1, 0});
Xtensive.Tuples.Tuple result = transform.Apply(TupleTransformType.TransformedTuple, source);
var source = Tuple.Create(1);
var transform = new MapTransform(true, TupleDescriptor.Create<byte, int, string>(), new[] {-1, 0});
var result = transform.Apply(TupleTransformType.TransformedTuple, source);
Assert.That(result.GetFieldState(0), Is.EqualTo(TupleFieldState.Default));
Assert.That(result.GetFieldState(1), Is.EqualTo(TupleFieldState.Available));
Assert.That(result.GetFieldState(2), Is.EqualTo(TupleFieldState.Default));
Expand Down
139 changes: 76 additions & 63 deletions Orm/Xtensive.Orm.Tests.Core/Tuples/Transform/MergeTransformTest.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
// Copyright (C) 2003-2010 Xtensive LLC.
// All rights reserved.
// For conditions of distribution and use, see license.
// Copyright (C) 2008-2021 Xtensive LLC.
// This code is distributed under MIT license terms.
// See the License.txt file in the project root for more information.
// Created by: Alex Yakunin
// Created: 2008.06.05

using System;
using NUnit.Framework;
using Xtensive.Comparison;
using Xtensive.Core;
using Xtensive.Tuples;
using Xtensive.Orm.Tests;
using Xtensive.Tuples.Transform;
using Tuple = Xtensive.Tuples.Tuple;

namespace Xtensive.Orm.Tests.Core.Tuples.Transform
{
[TestFixture]
public class MergeTransformTest
{
public const int IterationCount = 1000000;
private const int IterationCount = 1_000_000;
private const int MeasurementRuns = 5;

[Test]
public void BaseTest()
Expand All @@ -27,8 +24,8 @@ public void BaseTest()
Xtensive.Tuples.Tuple t2 = Xtensive.Tuples.Tuple.Create(3, 4.0, "5");
TestLog.Info($"Originals: {t1}, {t2}");

CombineTransform mt = new CombineTransform(false, t1.Descriptor, t2.Descriptor);
CombineTransform mtro = new CombineTransform(true, t1.Descriptor, t2.Descriptor);
ConcatTransform mt = new ConcatTransform(false, t1.Descriptor, t2.Descriptor);
ConcatTransform mtro = new ConcatTransform(true, t1.Descriptor, t2.Descriptor);

Xtensive.Tuples.Tuple wt1 = mt.Apply(TupleTransformType.TransformedTuple, t1, t2);
TestLog.Info($"Wrapper: {wt1}");
Expand Down Expand Up @@ -57,34 +54,27 @@ public void BaseTest()
AssertEx.Throws<NotSupportedException>(delegate {
wtro.SetValue(2, 0);
});
}

[Test]
public void ToStringTest()
{
Xtensive.Tuples.Tuple t1 = Xtensive.Tuples.Tuple.Create(1, "2");
Xtensive.Tuples.Tuple t2 = Xtensive.Tuples.Tuple.Create(3, 4.0, "5");

var ct = new ConcatTransform(false, t1.Descriptor, t2.Descriptor);
Assert.That(ct.ToString(), Is.EqualTo("ConcatTransform(TupleDescriptor(Int32, String) + TupleDescriptor(Int32, Double, String), r/w)"));

CombineTransform mt3 = new CombineTransform(false, t1.Descriptor, t1.Descriptor, t1.Descriptor);
Xtensive.Tuples.Tuple wt3 = mt3.Apply(TupleTransformType.TransformedTuple, t1, t1, t1);
TestLog.Info($"Wrapper: {wt3}");
Xtensive.Tuples.Tuple ct3 = mt3.Apply(TupleTransformType.Tuple, t1, t1, t1);
TestLog.Info($"Copy: {ct3}");
t1.SetValue(0,0);
Assert.That(t1.GetValue(0), Is.EqualTo(wt3.GetValue(4)));
t1.SetValue(0,1);

CombineTransform mt4 = new CombineTransform(false, t1.Descriptor, t1.Descriptor, t1.Descriptor, t1.Descriptor);
Xtensive.Tuples.Tuple wt4 = mt4.Apply(TupleTransformType.TransformedTuple, t1, t1, t1, t1);
TestLog.Info($"Wrapper: {wt4}");
Xtensive.Tuples.Tuple ct4 = mt4.Apply(TupleTransformType.Tuple, t1, t1, t1, t1);
TestLog.Info($"Copy: {ct4}");
t1.SetValue(0,0);
Assert.That(t1.GetValue(0), Is.EqualTo(wt4.GetValue(6)));
t1.SetValue(0,1);
}

[Test]
[Explicit]
[Category("Performance")]
public void PerformanceTest1()
public void ComparisonPerformanceTest()
{
AdvancedComparerStruct<Xtensive.Tuples.Tuple> comparer = AdvancedComparerStruct<Xtensive.Tuples.Tuple>.Default;
Xtensive.Tuples.Tuple t = Xtensive.Tuples.Tuple.Create(1);
CombineTransform mt = new CombineTransform(false, t.Descriptor, t.Descriptor);
ConcatTransform mt = new ConcatTransform(false, t.Descriptor, t.Descriptor);
Xtensive.Tuples.Tuple wt1 = mt.Apply(TupleTransformType.TransformedTuple, t, t);
Xtensive.Tuples.Tuple wt2 = mt.Apply(TupleTransformType.TransformedTuple, t, t);
Xtensive.Tuples.Tuple ct1 = mt.Apply(TupleTransformType.Tuple, t, t);
Expand All @@ -96,55 +86,78 @@ public void PerformanceTest1()
comparer.Equals(wt1, wt2);

TestHelper.CollectGarbage();
using (new Measurement("O&O", MeasurementOptions.Log, count))
for (int i = 0; i<count; i++)
using (var mx = new Measurement("O&O", MeasurementOptions.Log, count)) {
for (int i = 0; i < count; i++)
comparer.Equals(ct1, ct2);

mx.Complete();
Console.WriteLine(mx.ToString());
}

TestHelper.CollectGarbage();
using (new Measurement("O&W", MeasurementOptions.Log, count))
for (int i = 0; i<count; i++)
using (var mx =new Measurement("O&W", MeasurementOptions.Log, count)) {
for (int i = 0; i < count; i++)
comparer.Equals(ct1, wt1);

mx.Complete();
Console.WriteLine(mx.ToString());
}

TestHelper.CollectGarbage();
using (new Measurement("W&W", MeasurementOptions.Log, count))
using (var mx = new Measurement("W&W", MeasurementOptions.Log, count)) {
for (int i = 0; i<count; i++)
comparer.Equals(wt1, wt2);

mx.Complete();
Console.WriteLine(mx.ToString());
}
}


[Test]
[Explicit]
[Category("Performance")]
public void PerformanceTest2()
public void InstanceCreationPerformanceTest()
{
AdvancedComparerStruct<Xtensive.Tuples.Tuple> comparer = AdvancedComparerStruct<Xtensive.Tuples.Tuple>.Default;
Xtensive.Tuples.Tuple t = Xtensive.Tuples.Tuple.Create(1);
CombineTransform mt = new CombineTransform(false, t.Descriptor, t.Descriptor, t.Descriptor, t.Descriptor);
SegmentTransform st = new SegmentTransform(false, mt.Descriptor, new Segment<int>(1,2));
Xtensive.Tuples.Tuple wt1 = st.Apply(TupleTransformType.TransformedTuple, mt.Apply(TupleTransformType.TransformedTuple, t, t, t, t));
Xtensive.Tuples.Tuple wt2 = st.Apply(TupleTransformType.TransformedTuple, mt.Apply(TupleTransformType.TransformedTuple, t, t, t, t));
Xtensive.Tuples.Tuple ct1 = st.Apply(TupleTransformType.Tuple, mt.Apply(TupleTransformType.Tuple, t, t, t, t));
Xtensive.Tuples.Tuple ct2 = st.Apply(TupleTransformType.Tuple, mt.Apply(TupleTransformType.Tuple, t, t, t, t));
int count = IterationCount;

comparer.Equals(ct1, ct2);
comparer.Equals(ct1, wt1);
comparer.Equals(wt1, wt2);

TestHelper.CollectGarbage();
using (new Measurement("O&O", MeasurementOptions.Log, count))
for (int i = 0; i<count; i++)
comparer.Equals(ct1, ct2);

TestHelper.CollectGarbage();
using (new Measurement("O&W", MeasurementOptions.Log, count))
for (int i = 0; i<count; i++)
comparer.Equals(ct1, wt1);

TestHelper.CollectGarbage();
using (new Measurement("W&W", MeasurementOptions.Log, count))
for (int i = 0; i<count; i++)
comparer.Equals(wt1, wt2);
Xtensive.Tuples.Tuple t1 = Xtensive.Tuples.Tuple.Create(1);
Xtensive.Tuples.Tuple t2 = Xtensive.Tuples.Tuple.Create(1, "2");
Xtensive.Tuples.Tuple t3 = Xtensive.Tuples.Tuple.Create(1, 2L, "3");
Xtensive.Tuples.Tuple t4 = Xtensive.Tuples.Tuple.Create(1, 2L, "3", "4");
Xtensive.Tuples.Tuple t5 = Xtensive.Tuples.Tuple.Create(1, 2L, "3", "4", 5);
Xtensive.Tuples.Tuple t6 = Xtensive.Tuples.Tuple.Create(1, 2L, "3", "4", 5, 6L);

int count = IterationCount * 10;

_ = new ConcatTransform(false, t1.Descriptor, t1.Descriptor);
_ = new ConcatTransform(false, t2.Descriptor, t2.Descriptor);
_ = new ConcatTransform(false, t3.Descriptor, t3.Descriptor);
_ = new ConcatTransform(false, t4.Descriptor, t4.Descriptor);
_ = new ConcatTransform(false, t5.Descriptor, t5.Descriptor);

for (var run = 0; run < MeasurementRuns; run++) {
TestHelper.CollectGarbage();
using (var mx = new Measurement("N1Concat", MeasurementOptions.Log, count)) {
for (int i = 0; i < count; i++) {
_ = new ConcatTransform(false, t1.Descriptor, t1.Descriptor);
}

mx.Complete();
Console.WriteLine(mx.ToString());
}
}

Console.WriteLine();
for (var run = 0; run < MeasurementRuns; run++) {
TestHelper.CollectGarbage();
using (var mx = new Measurement("N5Concat", MeasurementOptions.Log, count)) {
for (int i = 0; i < count; i++) {
_ = new ConcatTransform(false, t5.Descriptor, t5.Descriptor);
}

mx.Complete();
Console.WriteLine(mx.ToString());
}
}
}
}
}
Loading
Loading