Skip to content

Update to .NET 9#324

Merged
TheCodeTraveler merged 66 commits intomainfrom
Support-NET-9
Nov 12, 2024
Merged

Update to .NET 9#324
TheCodeTraveler merged 66 commits intomainfrom
Support-NET-9

Conversation

@TheCodeTraveler
Copy link
Copy Markdown
Collaborator

@TheCodeTraveler TheCodeTraveler commented Oct 14, 2024

Description of Change

This PR updates CommunityToolkit.Maui.Markup for .NET 9

PR Checklist

Breaking Changes

  • String-based bindings are no-longer trim safe
    • eg .Bind(Label.TextProperty, nameof(MyViewModel.LabelText) is not trim safe
    • Use .Bind(Label.TextProperty, static (MyViewModel vm) => vm.LabelText) instead
  • .BindClickGesture Removed
    • Use .BindTapGesture instead
  • .ClickGesture Removed
    • Use .TapGesture instead
  • NuGet package will not support Microsoft.Maui.Controls .NET 10 until .NET 10 GA

Benchmarks

.NET 8

Method Mean Error StdDev Ratio RatioSD Allocated Alloc Ratio
ExecuteDefaultBindings_ViewModelToView 9.947 ns 0.1944 ns 0.1818 ns 1.00 0.02 - NA
ExecuteDefaultBindingsMarkup_ViewModelToView 9.857 ns 0.1067 ns 0.0946 ns 0.99 0.02 - NA
ExecuteTypedBindingsMarkup_ViewModelToView 9.965 ns 0.1869 ns 0.1748 ns 1.00 0.02 - NA
Method Mean Error StdDev Ratio RatioSD Gen0 Allocated Alloc Ratio
ExecuteDefaultBindings_ViewToViewModel 707.6 ns 6.35 ns 5.94 ns 1.00 0.01 0.0076 160 B 1.00
ExecuteDefaultBindingsMarkup_ViewToViewModel 694.7 ns 7.92 ns 7.02 ns 0.98 0.01 0.0076 160 B 1.00
ExecuteTypedBindingsMarkup_ViewToViewModel 698.3 ns 10.45 ns 9.78 ns 0.99 0.02 0.0076 160 B 1.00
Method Mean Error StdDev Ratio RatioSD Gen0 Gen1 Allocated Alloc Ratio
InitializeDefaultBindings 10.13 μs 0.177 μs 0.204 μs 1.00 0.03 0.1373 0.1221 2.53 KB 1.00
InitializeDefaultBindingsMarkup 10.18 μs 0.196 μs 0.269 μs 1.01 0.03 0.1373 0.1221 2.53 KB 1.00
InitializeTypedBindingsMarkup 138.97 μs 2.692 μs 2.518 μs 13.72 0.36 0.4883 0.2441 11.06 KB 4.37

.NET 9

Method Mean Error StdDev Ratio RatioSD Allocated Alloc Ratio
ExecuteDefaultBindings_ViewModelToView 18.52 ns 0.212 ns 0.199 ns 1.00 0.01 - NA
ExecuteDefaultBindingsMarkup_ViewToViewModel 111.60 ns 0.246 ns 0.218 ns 6.03 0.06 - NA
ExecuteTypedBindingsMarkup_ViewModelToView 18.39 ns 0.169 ns 0.158 ns 0.99 0.01 - NA
Method Mean Error StdDev Ratio Allocated Alloc Ratio
ExecuteDefaultBindings_ViewToViewModel 112.15 ns 0.225 ns 0.199 ns 1.00 - NA
ExecuteDefaultBindingsMarkup_ViewModelToView 18.59 ns 0.200 ns 0.187 ns 0.17 - NA
ExecuteTypedBindingsMarkup_ViewToViewModel 115.63 ns 0.225 ns 0.211 ns 1.03 - NA
Method Mean Error StdDev Ratio RatioSD Gen0 Gen1 Allocated Alloc Ratio
InitializeDefaultBindings 7.798 μs 0.0847 μs 0.0793 μs 1.00 0.01 0.1068 0.0916 2.03 KB 1.00
InitializeDefaultBindingsMarkup 7.735 μs 0.1249 μs 0.1107 μs 0.99 0.02 0.1068 0.0916 2.03 KB 1.00
InitializeTypedBindingsMarkup 126.444 μs 0.7803 μs 0.7299 μs 16.22 0.18 0.4883 0.2441 10.64 KB 5.24

@TheCodeTraveler TheCodeTraveler removed the request for review from bijington November 12, 2024 20:47
@TheCodeTraveler TheCodeTraveler merged commit 7a55890 into main Nov 12, 2024
@TheCodeTraveler TheCodeTraveler deleted the Support-NET-9 branch November 12, 2024 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants