-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Windows] Skip initial assignments in property mapper (take 3) #23987
base: main
Are you sure you want to change the base?
[Windows] Skip initial assignments in property mapper (take 3) #23987
Conversation
@@ -32,6 +32,8 @@ protected ElementHandler(IPropertyMapper mapper, CommandMapper? commandMapper = | |||
|
|||
public IElement? VirtualView { get; private protected set; } | |||
|
|||
internal bool _isPlatformViewNew; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main change.
I placed the property in ElementHandler
because then it's not a public API change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this can be an internal property:
internal bool _isPlatformViewNew; | |
internal bool IsPlatformViewInitialized { get; } |
But in a perfect world, where would this property go? Should this be on an interface or something to avoid the cast in each mapper? Pity we never added a isFirstRun
property to the mappers... pity.
But maybe we just need a handler IsInitialized
property to IElementHandler? Can we add that as a default interface implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this can be an internal property:
If you mean this:
private bool _isPlatformViewInitialized; // we can read & write
internal bool IsPlatformViewInitialized => _isPlatformViewInitialized; // not writable from outside
Yes. That should be possible.
But in a perfect world, where would this property go? Should this be on an interface or something to avoid the cast in each mapper? Pity we never added a isFirstRun property to the mappers... pity.
I think that in a perfect world, it would be passed through mappers. But unfortunately, I don't see a way to do it there.
But maybe we just need a handler
IsInitialized
property to IElementHandler? Can we add that as a default interface implementation?
If you mean this https://github.com/MartyIX/maui/tree/feature/2024-09-13-IsInitialized (MartyIX@bff5ee4), then it requires an API change and there would be many additional changes needed - see:
That is because .NET Standard 2.0 does not support default interface implementations (flashback).
4d54f6e
to
f6c8ab0
Compare
f6c8ab0
to
d7de3ca
Compare
d7de3ca
to
3bf5c12
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
3bf5c12
to
53435ce
Compare
…esAccessibilityView`
53435ce
to
2bb7162
Compare
Description of Change
Alternative to #22108
Performance implications
Best time observed
FocusManager
(take 2) #24695 helped us to get to ~200ms.BTW: In vanilla WinUI, the grid scenario takes ~100 ms. So MAUI is only about 50% slower than WinUI with this PR.
Issues Fixed
Contributes to #17303
Contributes to #21787