dotnet/runtime

`Path.GetRandomFileName()` is 7 times slower on Linux compared to Windows

Open

#31.271 geöffnet am 23. Okt. 2019

Auf GitHub ansehen
 (11 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C# (5.445 Forks)batch import
Hackathonarea-System.IOhelp wantedos-linuxtenet-performance

Repository-Metriken

Stars
 (17.886 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 12T 11h) (661 gemergte PRs in 30 T)

Beschreibung

Path.GetRandomFileName() is 7 times slower on Linux compared to Windows.

Slower diff/base Windows Median (ns) Linux Median (ns) Modality
System.IO.Tests.Perf_Path.GetRandomFileName 7.48 100.47 751.86

The contributor who wants to work on this issue should:

  1. Run this simple benchmark from dotnet/performance repository and confirm the problem
git clone https://github.com/dotnet/performance.git
python3 ./performance/scripts/benchmarks_ci.py -f netcoreapp5.0 --filter System.IO.Tests.Perf_Path.GetRandomFileName
  1. Build CoreCLR locally: https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-corefx.md#Build
  2. Create a small repro app: https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-corefx.md#repro
  3. Use PerfCollect to identify issue https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-corefx.md#PerfCollect
  4. Solve the issue

Contributor Guide