Optimize parsing/conversion of TextDecorations from string, reduce allocations#9778
Merged
dipeshmsft merged 12 commits intoMay 16, 2025
Merged
Conversation
721af99 to
00c98c2
Compare
00c98c2 to
7b630e3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9778 +/- ##
===================================================
- Coverage 11.22814% 11.21368% -0.01446%
===================================================
Files 3352 3352
Lines 668000 667934 -66
Branches 74980 74971 -9
===================================================
- Hits 75004 74900 -104
- Misses 591745 591871 +126
+ Partials 1251 1163 -88
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Member
Author
|
@dipeshmsft Any news on this one? We've merged the tests several weeks ago already for this one. |
dipeshmsft
approved these changes
May 16, 2025
Member
|
Thanks @h3xds1nz for this contribution. |
Member
Author
|
@dipeshmsft Great, happy to see it in :) |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Optimize parsing of
TextDecorationsfrom string intoTextDecorationCollection, reduces allocations in all steps and improves performance, also reduces the memory footprint + readibility of the entire class by a large amount.TextDecorationNames, that also removes the strings allocations on its own (not used anywhere else).PredefinedTextDecorations, which was redundant from the start.ConvertFromString benchmarks
Customer Impact
Improved performance, decreased allocations.
Regression
No.
Testing
Local build, CI, extensive assert testing:
Risk
Should be safe, I believe I've tested thoroughly all cases and we shall have no surprises.
Microsoft Reviewers: Open in CodeFlow