- Notifications
You must be signed in to change notification settings - Fork5.2k
Replaced string concatenation by StringBuilder usage#95760
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ghost commentedDec 7, 2023
Tagging subscribers to this area: @dotnet/ncl Issue DetailsDescriptionThe proposed change is just a simple optimization of mail address collection encoding and touches only the collection type itself, not Customer ImpactA bit smaller pressure on the GC. RegressionNope. TestingExisting tests are enough to cover the change.
|
src/libraries/System.Net.Mail/src/System/Net/Mail/MailAddressCollection.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/libraries/System.Net.Mail/src/System/Net/Mail/MailAddressCollection.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
rzikm left a comment
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.
looks good so far,@YohDeadfall can you look into usingValueStringBuilder as huoyaoyuan suggested?
YohDeadfall commentedDec 12, 2023
Yup, will use it instead of the |
src/libraries/System.Net.Mail/src/System/Net/Mail/MailAddressCollection.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
3d3d536 tofc389e6Compare373b96f tofc389e6CompareYohDeadfall commentedDec 21, 2023
@rzikm, could you help me with that weird error happening only for some builds?
|
ManickaP commentedJan 2, 2024
runtime/src/libraries/System.Net.Http/src/System.Net.Http.csproj Lines 161 to 162 in9e57b6a
|
YohDeadfall commentedJan 2, 2024
That's exactly what I did: runtime/src/libraries/System.Net.Mail/src/System.Net.Mail.csproj Lines 71 to 72 infc389e6
And it's in the same block where |
rzikm commentedJan 2, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@YohDeadfall The build failure is in unit test project, you need to include the This is a gimmick of some unit test projects in this repo, we compile the same source codes again as part of unit test projects in order to be able to use internal APIs for testing. |
YohDeadfall commentedJan 2, 2024
@rzikm, now it looks fine, thank you! |
rzikm commentedJan 2, 2024
CI is passing, the one failure is unrelated. looks good now. |
rzikm commentedJan 2, 2024
Thanks a lot for the patience with the contribution! |
Description
The proposed change is just a simple optimization of mail address collection encoding and touches only the collection type itself, not
MailAddresswhich uses string concatenation internally in many places.Customer Impact
A bit smaller pressure on the GC.
Regression
Nope.
Testing
Existing tests are enough to cover the change.