Repository navigation
perf(dp): Inline storage for small DependencyObjectCollections - #26587
MartinZikmund wants to merge 2 commits into
Conversation
Co-Authored-By: Martin Zikmund <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu1LMuUpziGZWHVDmpX
Co-Authored-By: Martin Zikmund <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu1LMuUpziGZWHVDmpX
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
Tick the box to add this pull request to the merge queue (same as
|
|
Claude finished @MartinZikmund's task in 24s —— View job Review of #26587: inline storage for
|
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 247321 found UI Test snapshots differences: Details
|
GitHub Issue: Part of #24093
PR Type:
🔄 Refactoring
What changed? 🚀
Split out of #24094 (originally by @morning4coffe-dev), which now only carries the opt-in
XamlOptionalChangespart. This piece is always on, so it gets its own review.DependencyObjectCollection<T>stores up to two items inline (C#InlineArray) and allocates aList<T>only for the third. WinUI measured 82.68% of DO collections at size 0–2 and made the same change in f235521a.List<T>, replacing an item through the indexer doesn't invalidate in-flight enumerators.ReplaceRangeis rebuilt on the inline storage. Row/ColumnDefinition, Inline, Timeline and VisualStateGroup collections follow the new API.Validation
Uno.UI.UnitTests(net11.0).Given_DependencyObjectCollection*, 78/78.Performance
Headless Skia app with Fluent resources (x64, net10.0,
DOTNET_TieredCompilation=0), one process per scenario, 4 interleaved A/B rounds againstmaster. Allocations are UI-thread bytes and exact: amaster-vs-masternull run drifted 0.00%. A time change is bold only when it is larger than that scenario's null drift and the A/B ranges don't overlap; anything else is marked noise. Background load on the machine made some timings noisy.Grids with 2 rows + 1 columnButtons, built + laid outTagset/getSmall collections save 272 B per
Gridwith two rows and one column (−5%, 15% faster), and about 2.7 KB per control on the mixed page.Warning
Open regression: visual-state changes allocate +85 B per state change (+4.6%), exactly reproducible across all rounds. A sampled allocation trace points at extra boxed collection enumerators on the setter/storyboard paths of
VisualStateGroup.GoToState, but the call counts through the publicGetEnumeratorare identical tomaster, so the root cause isn't pinned yet. This should be resolved before merging.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
https://claude.ai/code/session_01TXMNu1LMuUpziGZWHVDmpX