Repository navigation
perf(wasm): Enable XAML resource trimming in Release - #26071
Closed
MartinZikmund wants to merge 3 commits into
Closed
MartinZikmund wants to merge 3 commits into
MartinZikmund wants to merge 3 commits into
Conversation
With XAML resource trimming, ItemContainer was only created through a XamlReader string, so the trimmer removed it and items rendered empty. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu2RupRy4QPFGK2cmij
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu2RupRy4QPFGK2cmij
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu2RupRy4QPFGK2cmij
2 of 5 tasks
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
Contributor
|
The build 243775 found UI Test snapshots differences: Details
|
Contributor
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-26071/docs/index.html |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
GitHub Issue: closes #26070
PR Type:
✨ Feature
What changed? 🚀
Uno.Sdk WebAssembly heads now default
UnoXamlResourcesTrimmingtotruein Release (Optimize=true), where ILLink already runs. An explicit value in the project wins, sofalseopts out. Debug builds, other targets, and AOT profile generation (Uno.GenerateAot.targetsstill forcesfalse) are unchanged.While validating this, a control gallery app showed one Uno-internal casualty: an
ItemsViewwithout anItemTemplaterendered empty. Its default template was built withXamlReader.Load, so the trimmer never sawItemContainerbeing created. This was observed together with #26054, which stops keeping a control's bindable metadata just because the type survives anischeck. That change is the likely trigger, though master + trimming was not built separately to confirm, so this fix should land before or with #26054. It is now built in code, likeItemsRepeater's default. The remainingXamlReader.Loadstring calls in Uno.UI build aTabViewItemgeometry and aRun, not controls (TabViewrenders correctly trimmed).Known limit, unchanged from opting in today (documented in
resources-trimming.md): app code that creates controls only throughXamlReader.Loadstrings needs those controls rooted, or must opt out.Validation:
ItemsView,TabView, flyouts) is pixel-identical between trimmed and untrimmed builds once theItemsViewfix is in. Before the fix, theItemsViewitems were missing.Given_ItemsView.When_No_ItemTemplate_Then_Items_Shown_In_ItemContainerspasses on Skia desktop.Measurements
How this was measured
Blank
dotnet new unoapp(Skia,net10.0-browserwasm, Release publish), with the other startup PRs (#26054–#26059) applied, built with and withoutUnoXamlResourcesTrimming. Both builds were served by the same static server (brotli q11, immutable caching for fingerprinted files) and loaded cold in headless Chrome, runs interleaved. "Visually ready" is the first CDP screencast frame identical to the settled final frame. 4G = 9 Mbps down, 85 ms RTT (CDP emulation). Mobile = 4G plus 4× CPU throttling. Values are medians with (min–max). A difference is only claimed where the ranges don't overlap. Rig: Playwright + Node, available on request.PR Checklist ✅
Screenshots Compare Test Runresults.Not ticked "no breaking changes": apps that build controls only from
XamlReader.Loadstrings must root them or setUnoXamlResourcesTrimming=false.🤖 Generated with Claude Code
https://claude.ai/code/session_01TXMNu2RupRy4QPFGK2cmij