-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use SearchValues throughout dotnet/aspnetcore (part 3) #54878
Merged
amcasey
merged 5 commits into
dotnet:main
from
ladeak:ladeak-46484-searchvalues-tagbuild
Apr 5, 2024
Merged
Use SearchValues throughout dotnet/aspnetcore (part 3) #54878
amcasey
merged 5 commits into
dotnet:main
from
ladeak:ladeak-46484-searchvalues-tagbuild
Apr 5, 2024
Conversation
This file contains 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
dotnet-issue-labeler
bot
added
the
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
label
Apr 1, 2024
dotnet-policy-service
bot
added
the
community-contribution
Indicates that the PR has been added by a community member
label
Apr 1, 2024
ladeak
commented
Apr 1, 2024
ladeak
changed the title
# Use SearchValues throughout dotnet/aspnetcore (part 3)
Use SearchValues throughout dotnet/aspnetcore (part 3)
Apr 1, 2024
- Adding further tests and a new benchmark to compare before-after performance - Updating the implementation of TagBuilder to use SearchValues instead manual operation
ladeak
force-pushed
the
ladeak-46484-searchvalues-tagbuild
branch
from
April 3, 2024 20:07
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still a couple outstanding questions, but things LGTM. Thanks!
amcasey
approved these changes
Apr 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
community-contribution
Indicates that the PR has been added by a community member
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
TagBuilderBenchmark
andBenchmarkDotNet=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
IUriHelper
so 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