Repository navigation
perf: Trim the package manifest parser when no manifest is embedded - #26058
Draft
MartinZikmund wants to merge 1 commit into
Draft
MartinZikmund wants to merge 1 commit into
MartinZikmund wants to merge 1 commit into
Conversation
Package parses an embedded Package.appxmanifest with XmlDocument and XPath, which keeps System.Private.Xml in every trimmed app even where no manifest is embedded (WebAssembly heads), so the parse never runs. Heads without one now turn the parser off through a feature switch: -150 KB brotli on a blank WebAssembly app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TXMNu2RupRy4QPFGK2cmij
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
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 #26052
PR Type:
✨ Feature
What changed? 🚀
Package.ParsePackageManifestusesXmlDocumentand XPath, which keepsSystem.Private.Xmlin every trimmed app, even WebAssembly heads that embed no manifest and therefore never parse one.The parser now sits behind a
[FeatureSwitchDefinition("Uno.ApplicationModel.Package.IsManifestEmbedded")]switch. Heads without an embeddedPackage.appxmanifestturn it off (RuntimeHostConfigurationOption,Trim="true"). Heads that embed one (desktop) are unchanged.Blank WebAssembly app: −150 KB brotli (
System.Private.Xmlremoved, CoreLib −9 KB).Validation:
System.Private.Xml.wasmno longer shipped.Packagebehavior on WASM is unchanged, since no manifest was embedded before either.Measurements
Measured on adjacent builds: the same tree just before and just after this commit.
How this was measured
Blank
dotnet new unoapp(Skia,net10.0-browserwasm, Release publish), built twice from the same tree: with all six startup PRs (#26054–#26059) plusUnoXamlResourcesTrimming, and with this PR's change removed (adjacent builds). 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). 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.🤖 Generated with Claude Code
https://claude.ai/code/session_01TXMNu2RupRy4QPFGK2cmij