Repository navigation
perf: Use System.Threading.Lock and freeze the ARIA role table - #26589
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 21s —— View job Review summaryVerdict: ship. 0 blocking issues, 0 inline findings.
|
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 247324 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.System.Threading.Lockreplacesobjectmonitors for the hot, contended private gates inWeakReferencePoolandNativeDispatcher.FrozenDictionary.The original microbenchmarks in #24094 (net10, isolated gates) measured the weak-reference pool gate is 34–58% faster across 1–8 threads, and frozen ARIA lookups are 34% faster.
Validation
Uno.UI.UnitTests(net11.0).Given_NativeDispatcher_Concurrency,Given_WeakReferencePool_ConcurrencyandGiven_AriaMapper, 22/22.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.AriaMapper.GetAriaRolelookupsWeakReferencePoolrent/return, 4 threads × 50k{Binding}s (Name,Address.City,Tags[1])Tagset/getThe frozen ARIA role table makes role lookups 42% faster with no allocations. Under 4-thread contention, the weak-reference pool came out 7% faster with
Lock, which is within this run's noise. Bindings, which rent from that pool, are unchanged.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
https://claude.ai/code/session_01TXMNu1LMuUpziGZWHVDmpX