Registry Mirror
Skip to content

Conversation

@vbreuss

@vbreuss vbreuss commented Nov 28, 2026

Copy link
Copy Markdown
Member

GetMoveLocation builds 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 with Storage.GetLocation. That looks up the drive and calls GetFullPath, 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 its friendlyName parameter, it uses the path as the friendly name. A destination that ends with a separator, such as a root, and network shares still go through GetLocation, 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.

@vbreuss vbreuss self-assigned this Nov 28, 2026
@mergify

mergify Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

This pull request is merged.

@greptile-apps

greptile-apps Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Confidence Score: 4/5 · Fix the drive assigned to moved children before merging.RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change is limited to child locations created during mock directory moves.

Fix the drive assigned to moved children before merging.

Findings

  1. P1 Moved files use another drive ▶

Summary

The PR avoids resolving each moved child's destination again.

  • Directory moves build child destinations without resolving ordinary paths again.

Reviews (1) · Last reviewed commit: "perf: create the destination location of..." · Reviewed by Greptile

@github-actions

Copy link
Copy Markdown

Test Results

     80 files       80 suites   1h 38m 42s ⏱️
 88 647 tests  83 927 ✅  4 720 💤 0 ❌
205 254 runs  185 316 ✅ 19 938 💤 0 ❌

Results for commit 4c1f4e9.

@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

🚀 Benchmark Results

Compared to main, which ran on the same runner. Times that change by more than 10% are marked.

Memory

Benchmark main PR Δ
Initialize (N=100) 458,767 B 449,814 B 🟢 -8,953 B (-2%)
RoundTrip (Size=65536) 414,037 B 414,023 B 🟢 -14 B (±0%)
MoveTree 467,658 B 460,874 B 🟢 -6,784 B (-1%)

Time

Benchmark main PR Δ
RoundTrip (Size=1024) 12.18 μs 10.30 μs 🟢 -15%
CompleteTestBenchmarks
Complete Mean Error StdDev Ratio Allocated Alloc Ratio
Testably 78.41 μs 0.957 μs 0.895 μs 1.00 89.38 KB 1.00
SystemIOAbstractions 77.07 μs 2.014 μs 1.884 μs 0.98 166.7 KB 1.87
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
Initialize N Mean Error StdDev Ratio Allocated Alloc Ratio
Testably 10 38.18 μs 0.727 μs 0.644 μs 1.00 56.63 KB 1.00
SystemIOAbstractions 10 23.29 μs 0.250 μs 0.234 μs 0.61 48.59 KB 0.86
Testably 100 321.53 μs 1.375 μs 1.287 μs 1.00 439.27 KB 1.00
SystemIOAbstractions 100 180.25 μs 1.793 μs 1.677 μs 0.56 392.78 KB 0.89
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
CreateMock Mean Error StdDev Ratio Allocated Alloc Ratio
Testably 2.750 μs 0.0446 μs 0.0395 μs 1.00 7.41 KB 1.00
SystemIOAbstractions 3.733 μs 0.0362 μs 0.0338 μs 1.36 8.15 KB 1.10
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
RoundTrip Size Mean Error StdDev Ratio Allocated Alloc Ratio
Testably 1024 10.298 μs 1.988 μs 1.860 μs 1.03 12.36 KB 1.00
SystemIOAbstractions 1024 6.656 μs 2.850 μs 2.380 μs 0.67 16.54 KB 1.34
Testably 65536 173.846 μs 2.183 μs 2.042 μs 1.00 404.32 KB 1.00
SystemIOAbstractions 65536 76.928 μs 2.531 μs 2.367 μs 0.44 408.49 KB 1.01
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
Inspect Mean Error StdDev Ratio Allocated Alloc Ratio
Testably 4.030 μs 0.0943 μs 0.0788 μs 1.00 2.79 KB 1.00
SystemIOAbstractions 1.891 μs 0.0156 μs 0.0131 μs 0.47 2.55 KB 0.92
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
Chunks Mean Error StdDev Ratio Allocated Alloc Ratio
Testably 59.77 μs 2.194 μs 1.832 μs 1.00 209.21 KB 1.00
SystemIOAbstractions 95.81 μs 1.101 μs 0.976 μs 1.60 326.67 KB 1.56
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
MoveTree Mean Error StdDev Ratio Allocated Alloc Ratio
Testably 1,077.96 μs 5.485 μs 4.862 μs 1.00 450.07 KB 1.00
SystemIOAbstractions 61.80 μs 1.001 μs 0.888 μs 0.06 106.62 KB 0.24
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
Enumerate N Pattern Mean Error StdDev Ratio Allocated Alloc Ratio
Testably 10 ***** 7.820 μs 0.5010 μs 0.4441 μs 1.00 5.56 KB 1.00
SystemIOAbstractions 10 * 6.285 μs 0.0467 μs 0.0390 μs 0.81 3.93 KB 0.71
Testably 10 *.txt 7.593 μs 0.0312 μs 0.0277 μs 1.00 5.25 KB 1.00
SystemIOAbstractions 10 *.txt 9.972 μs 0.0372 μs 0.0348 μs 1.31 4.24 KB 0.81
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
Enumerate N Pattern Mean Error StdDev Ratio Allocated Alloc Ratio
Testably 1000 ***** 724.1 μs 13.75 μs 12.86 μs 1.00 318.94 KB 1.00
SystemIOAbstractions 1000 * 290.9 μs 4.09 μs 3.83 μs 0.40 70.42 KB 0.22
Testably 1000 *.txt 733.4 μs 7.96 μs 6.65 μs 1.00 284.18 KB 1.00
SystemIOAbstractions 1000 *.txt 527.2 μs 2.17 μs 1.93 μs 0.72 66.87 KB 0.24
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.
@vbreuss
vbreuss force-pushed the perf/move-destination-location branch from 4c1f4e9 to 87a42c4 Compare November 28, 2026 19:46
@vbreuss
vbreuss enabled auto-merge (squash) November 28, 2026 20:00
@sonarqubecloud

Copy link
Copy Markdown

@vbreuss
vbreuss merged commit 94bde4e into main Nov 28, 2026
25 checks passed
@vbreuss
vbreuss deleted the perf/move-destination-location branch November 28, 2026 22:40
github-actions Bot added a commit that referenced this pull request Nov 29, 2026
…f a moved entry without resolving it again (#1256) by Valentin Breuß
github-actions Bot added a commit that referenced this pull request Nov 29, 2026
…f a moved entry without resolving it again (#1256) by Valentin Breuß
@github-actions

Copy link
Copy Markdown

This is addressed in release v8.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant