-
Notifications
You must be signed in to change notification settings - Fork 1.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
Remove lots of unnecessary string allocations #4766
Merged
Merged
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
src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontCacheUtil.cs
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScopeConverter.cs
Outdated
Show resolved
Hide resolved
...Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeyTimeConverter.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PropVariant.cs
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/glyphs.cs
Show resolved
Hide resolved
...rc/PresentationFramework/System/Windows/Markup/Primitives/ExtensionSimplifierMarkupObject.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFixedPageReaderWriter.cs
Show resolved
Hide resolved
5fa9a03
to
6d7ac81
Compare
lindexi
reviewed
Jun 29, 2021
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedSchema.cs
Show resolved
Hide resolved
halgab
reviewed
Jun 29, 2021
...osoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/VirtualizingStackPanel.cs
Outdated
Show resolved
Hide resolved
Low-hanging fruit. Yay, span.
6d7ac81
to
f3c0278
Compare
halgab
reviewed
Jun 29, 2021
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/XamlToRtfWriter.cs
Outdated
Show resolved
Hide resolved
lindexi
reviewed
Jun 29, 2021
src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/MS/Impl/KnownStrings.cs
Show resolved
Hide resolved
f3c0278
to
29d01b5
Compare
lindexi
added a commit
to lindexi/lindexi_gd
that referenced
this pull request
Jun 30, 2021
RussKie
approved these changes
Jul 1, 2021
ryalanms
approved these changes
Jul 29, 2021
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
There are many places we're allocating temporary strings, e.g. from Substring, where we can now use spans.
Customer Impact
Less allocation/copying.
Regression
No
Testing
Just CI
Risk
Minimal. Changes are all local and can be easily reviewed for correctness.