Use StringBuilderCache in PathInternal.NormalizeDirectorySeparators by stephentoub · Pull Request #21760 · dotnet/coreclr (original) (raw)
When we do need to normalize, we're currently allocating the StringBuilder/char[] for the full path length. As long as the path length is less than the max cacheable size (360), we'll now use a cached builder.
cc: @JeremyKuhne
When we do need to normalize, we're currently allocating the StringBuilder/char[] for the full path length. As long as the path length is less than the max cacheable size (360), we'll now use a cached builder.
@dotnet-bot test Windows_NT x64 Release CoreFX Tests please
picenka21 pushed a commit to picenka21/runtime that referenced this pull request
When we do need to normalize, we're currently allocating the StringBuilder/char[] for the full path length. As long as the path length is less than the max cacheable size (360), we'll now use a cached builder.
Commit migrated from dotnet/coreclr@9d159ec