Use SearchValues throughout dotnet/aspnetcore (part 3) #54878
Merged
amcasey merged 5 commits intodotnet:mainfrom Apr 5, 2024
Merged
Use SearchValues throughout dotnet/aspnetcore (part 3) #54878amcasey merged 5 commits intodotnet:mainfrom
amcasey merged 5 commits intodotnet:mainfrom
Conversation
ladeak
commented
Apr 1, 2024
added 2 commits
April 3, 2024 22:07
- Adding further tests and a new benchmark to compare before-after performance - Updating the implementation of TagBuilder to use SearchValues instead manual operation
c437b88 to
8e7b24a
Compare
ladeak
commented
Apr 4, 2024
amcasey
reviewed
Apr 5, 2024
amcasey
reviewed
Apr 5, 2024
amcasey
approved these changes
Apr 5, 2024
Member
amcasey
left a comment
There was a problem hiding this comment.
There are still a couple outstanding questions, but things LGTM. Thanks!
amcasey
approved these changes
Apr 5, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use SearchValues throughout dotnet/aspnetcore (part 3)
TagBuilder using SearchValues.
UrlResolutionTagHelper using SearchValues.
Both are tasks of #46484
Description TagBuilder
Performance comparison TagBuilder
Using
TagBuilderBenchmarkandBenchmarkDotNet=v0.13.0, OS=Windows 10.0.22631
12th Gen Intel Core i7-1255U, 1 CPU, 12 logical and 10 physical cores
.NET SDK=9.0.100-preview.3.24161.2
[Host] : .NET 9.0.0 (9.0.24.17301), X64 RyuJIT
Job-YBJGDV : .NET 9.0.0 (9.0.24.16003), X64 RyuJIT
Server=True Toolchain=.NET Core 9.0 RunStrategy=Throughput
BEFORE:
AFTER:
Description UrlResolutionTagHelper
string.Performance comparison UrlResolutionTagHelper
Although I have compared perf before-after the changes, for the optimistic path when there are no excess the whitespaces, the perf remained the same (gains are negligible). With extra whitespaces there is some perf gain, but the exact measurement would depend on the actual implementation of
IUriHelperso the results are only "relative" (in my perf tests I used a FakeUriHelper). Hence, I have not committed the benchmark file nor included the results.Fixes #46484