-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
area-architectureIssues with code structure, SDK structure, implementation detailsIssues with code structure, SDK structure, implementation detailsdelighter-sclegacy-area-perfStartup / Runtime performanceStartup / Runtime performanceperf/generalThe issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)proposal/open
Milestone
Description
Description
A good example of this is:
maui/src/Core/src/Platform/Android/ActivityExtensions.cs
Lines 5 to 26 in 9a9537e
| internal static partial class ActivityExtensions | |
| { | |
| internal static Rect GetWindowFrame(this Android.App.Activity activity) | |
| { | |
| var bounds = PlatformInterop.GetCurrentWindowMetrics(activity); | |
| return activity.FromPixels(bounds); | |
| } | |
| internal static void UpdateX(this Android.App.Activity activity, IWindow window) => | |
| activity.UpdateUnsupportedCoordinate(window); | |
| internal static void UpdateY(this Android.App.Activity activity, IWindow window) => | |
| activity.UpdateUnsupportedCoordinate(window); | |
| internal static void UpdateWidth(this Android.App.Activity activity, IWindow window) => | |
| activity.UpdateUnsupportedCoordinate(window); | |
| internal static void UpdateHeight(this Android.App.Activity activity, IWindow window) => | |
| activity.UpdateUnsupportedCoordinate(window); | |
| internal static void UpdateUnsupportedCoordinate(this Android.App.Activity activity, IWindow window) => | |
| window.FrameChanged(activity.GetWindowFrame()); |
But patterns like this are in many places currently in .NET MAUI.
The only place we've attempted to do something better is:
| class AndroidBatchPropertyMapper<TVirtualView, TViewHandler> : PropertyMapper<TVirtualView, TViewHandler> |
But ideally, a pattern could be adopted/invented for all platforms.
Public API Changes
Depending on what the new, invented pattern is. There may be public API changes, not sure.
Intended Use-Case
Improved performance for:
- Startup
- Creating new controls/views
- Scrolling data-bound
CollectionView - etc. etc.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-architectureIssues with code structure, SDK structure, implementation detailsIssues with code structure, SDK structure, implementation detailsdelighter-sclegacy-area-perfStartup / Runtime performanceStartup / Runtime performanceperf/generalThe issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)proposal/open