C# Markup WinAppSDK Performance Improvements #18665
Labels
difficulty/tbd
Categorizes an issue for which the difficulty level needs to be defined.
kind/enhancement
New feature or request
triage/untriaged
Indicates an issue requires triaging or verification
UDPATE: It appears that the
DirectXaml
APIs are not available in WinAppSDK. Will update this issue once I have some info on possibly getting them exposed. Didn't realize the docs below were only for UWP (relatedmicrosoft-ui-xaml
issue I opened).What would you like to be added
Due to the way WinRT works, building up the UI programmatically is considerably less performant than when it is done with the XAML compiler. This is slightly problematic for C# markup running on WinAppSDK as currently written.
Luckily, there are high-performance
XamlDirect
APIs intended specifically to enable this scenario (that link has a lot of useful info in it, so have a look there), but C# Markup is currently not using them:Ideally, C# markup would use
XamlDirect
to build the whole object graph from start to end, but as it is currently designed, that might be challenging to do everywhere (i.e. because you callnew Button()
ctors directly to create buttons, for example). That said, there are still many places where the benefits ofXamlDirect
could be utilized to improve performance. One example is in all the property setter methods:Why is this needed
To bring C# Markup closer to parity with compiled XAML performance.
For which platform
Windows (WinAppSDK)
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: