Conversation
|
This pull request is merged. |
[Medium impact] The change is limited to child locations created during mock directory moves. Fix the drive assigned to moved children before merging. Findings
|
Test Results 80 files 80 suites 1h 38m 42s ⏱️ Results for commit 4c1f4e9. |
🚀 Benchmark ResultsCompared to Memory
Time
CompleteTestBenchmarks
BenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon) AMD EPYC 9V74 3.69GHz, 1 CPU, 4 logical and 2 physical cores .NET SDK 11.0.100 [Host] : .NET 10.0.15 (10.0.15, 10.0.1526.53008), X64 RyuJIT x86-64-v4 Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=1 WarmupCount=10 InitializationBenchmarks
BenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon) AMD EPYC 9V74 3.68GHz, 1 CPU, 4 logical and 2 physical cores .NET SDK 11.0.100 [Host] : .NET 10.0.15 (10.0.15, 10.0.1526.53008), X64 RyuJIT x86-64-v4 Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=1 WarmupCount=10 MockCreationBenchmarks
BenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon) AMD EPYC 9V74 3.69GHz, 1 CPU, 4 logical and 2 physical cores .NET SDK 11.0.100 [Host] : .NET 10.0.15 (10.0.15, 10.0.1526.53008), X64 RyuJIT x86-64-v4 Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=1 WarmupCount=10 FileRoundTripBenchmarks
BenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon) AMD EPYC 7763 2.74GHz, 1 CPU, 4 logical and 2 physical cores .NET SDK 11.0.100 [Host] : .NET 10.0.15 (10.0.15, 10.0.1526.53008), X64 RyuJIT x86-64-v3 Job=InProcess Toolchain=InProcessEmitToolchain InvocationCount=4096 IterationCount=15 LaunchCount=1 UnrollFactor=1 WarmupCount=10 FileInfoBenchmarks
BenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon) INTEL XEON PLATINUM 8573C 3.00GHz, 1 CPU, 4 logical and 2 physical cores .NET SDK 11.0.100 [Host] : .NET 10.0.15 (10.0.15, 10.0.1526.53008), X64 RyuJIT x86-64-v4 Job=InProcess Toolchain=InProcessEmitToolchain InvocationCount=65536 IterationCount=15 LaunchCount=1 UnrollFactor=1 WarmupCount=10 FileStreamBenchmarks
BenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon) INTEL XEON PLATINUM 8573C 3.10GHz, 1 CPU, 4 logical and 2 physical cores .NET SDK 11.0.100 [Host] : .NET 10.0.15 (10.0.15, 10.0.1526.53008), X64 RyuJIT x86-64-v4 Job=InProcess Toolchain=InProcessEmitToolchain InvocationCount=2048 IterationCount=15 LaunchCount=1 UnrollFactor=1 WarmupCount=10 DirectoryTreeBenchmarks
BenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon) AMD EPYC 7763 3.18GHz, 1 CPU, 4 logical and 2 physical cores .NET SDK 11.0.100 [Host] : .NET 10.0.15 (10.0.15, 10.0.1526.53008), X64 RyuJIT x86-64-v3 Job=InProcess Toolchain=InProcessEmitToolchain InvocationCount=512 IterationCount=15 LaunchCount=1 UnrollFactor=1 WarmupCount=10 Enumeration10Benchmarks
BenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon) AMD EPYC 7763 2.59GHz, 1 CPU, 4 logical and 2 physical cores .NET SDK 11.0.100 [Host] : .NET 10.0.15 (10.0.15, 10.0.1526.53008), X64 RyuJIT x86-64-v3 Job=InProcess Toolchain=InProcessEmitToolchain InvocationCount=16384 IterationCount=15 LaunchCount=1 UnrollFactor=1 WarmupCount=10 Enumeration1000Benchmarks
BenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon) Intel Xeon 6973P-C 3.60GHz, 1 CPU, 4 logical and 2 physical cores .NET SDK 11.0.100 [Host] : .NET 10.0.15 (10.0.15, 10.0.1526.53008), X64 RyuJIT x86-64-v4 Job=InProcess Toolchain=InProcessEmitToolchain InvocationCount=512 IterationCount=15 LaunchCount=1 UnrollFactor=1 WarmupCount=10 |
The drive of a relative destination is chosen before its path is resolved, so reusing it moved the used bytes of a directory on another drive than the main drive to the main drive.
4c1f4e9 to
87a42c4
Compare
|
…f a moved entry without resolving it again (#1256) by Valentin Breuß
…f a moved entry without resolving it again (#1256) by Valentin Breuß
|
This is addressed in release v8.1.2. |



GetMoveLocationbuilds the destination of every moved entry from the destination and the relative path of the entry, which are both already normalized full paths, and then resolved the result again withStorage.GetLocation. That looks up the drive and callsGetFullPath, which on Windows asks the operating system, for every moved entry; in a profile of moving a directory with 100 files it took about 16 % of the time.The location is now created directly with the drive of the destination. Like
GetLocation, which ignores itsfriendlyNameparameter, it uses the path as the friendly name. A destination that ends with a separator, such as a root, and network shares still go throughGetLocation, as joining them could change the path. Comparing both ways for the entries of 1,200 random moves on the native and the simulated Linux, macOS and Windows file systems gave the same full path, friendly name, drive and equality.In a local measurement, moving the directory allocated about 34 KB less.