dotnet/runtime
GitHub で見る`Path.GetRandomFileName()` is 7 times slower on Linux compared to Windows
Open
#31,271 opened on 2019年10月23日
Hackathonarea-System.IOhelp wantedos-linuxtenet-performance
Repository metrics
- Stars
- (17,886 stars)
- PR merge metrics
- (平均マージ 12d 11h) (30d で 661 merged PRs)
説明
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:
- 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
- Build CoreCLR locally: https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-corefx.md#Build
- Create a small repro app: https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-corefx.md#repro
- Use PerfCollect to identify issue https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-corefx.md#PerfCollect
- Solve the issue