-
Notifications
You must be signed in to change notification settings - Fork 299
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
Optimize WeakReferenceMessenger #44
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
Sergio0694
added
optimization ☄
Performance or memory usage improvements
mvvm-toolkit 🧰
Issues/PRs for the MVVM Toolkit
labels
Nov 29, 2021
Sergio0694
force-pushed
the
dev/weak-messenger-opts
branch
from
November 29, 2021 13:37
fe387be
to
7744ef3
Compare
Sergio0694
force-pushed
the
dev/weak-messenger-opts
branch
from
November 29, 2021 14:11
7744ef3
to
786c562
Compare
Also done some refactoring to streamline code across targets
Sergio0694
force-pushed
the
dev/weak-messenger-opts
branch
from
December 2, 2021 17:04
786c562
to
f86da36
Compare
XAML-Knight
approved these changes
Dec 3, 2021
CommunityToolkit.Mvvm/Messaging/Internals/System/Collections.Generic/Dictionary2.cs
Show resolved
Hide resolved
Arlodotexe
reviewed
Dec 3, 2021
tests/CommunityToolkit.Mvvm.UnitTests/Internals/Test_Dictionary2.cs
Outdated
Show resolved
Hide resolved
tests/CommunityToolkit.Mvvm.UnitTests/Internals/Test_Dictionary2.cs
Outdated
Show resolved
Hide resolved
...vm/Messaging/Internals/System/Runtime.CompilerServices/ConditionalWeakTable2{TKey,TValue}.cs
Show resolved
Hide resolved
...vm/Messaging/Internals/System/Runtime.CompilerServices/ConditionalWeakTable2{TKey,TValue}.cs
Show resolved
Hide resolved
Sergio0694
force-pushed
the
dev/weak-messenger-opts
branch
from
December 9, 2021 09:56
f86da36
to
64c8a62
Compare
Sergio0694
force-pushed
the
dev/weak-messenger-opts
branch
from
December 9, 2021 09:57
64c8a62
to
805437c
Compare
Removed type checks from guarded devirtualization when broadcasting
Arlodotexe
approved these changes
Dec 10, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
mvvm-toolkit 🧰
Issues/PRs for the MVVM Toolkit
optimization ☄
Performance or memory usage improvements
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.
Closes #40
This PR includes the following changes:
WeakReferenceMessenger.Send
is now zero-alloc 🚀WeakReferenceMessenger.Send
is now also ~2.4x faster 🚀Unsafe.As<T>(object)
used to alias delegate types (see [API Proposal]: RuntimeHelpers.ChangeType<TDelegate>(Delegate) API dotnet/runtime#57495)Benchmarks