Repository navigation
perf(win32): Stop raising UIA bounds changes on layout (6.8) - #24786
Conversation
Win32Accessibility raised a BoundingRectangle property-changed event for every element whose visual moved or resized. UIA clients (PowerToys, TextInputHost, browsers) are listening on most desktops, so every scroll frame paid a native UIA call per realized element. WinUI never raises this event on layout; clients pull BoundingRectangle on demand. ItemsRepeater grid of 2837 Fluent Buttons, 12 x 60 scroll steps, UI-thread accessibility time: 386 ms -> 148 ms. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AzHtsXz33DcziPre7h3b9f
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AzHtsXz33DcziPre7h3b9f
|
Claude finished @MartinZikmund's task in 2m 28s —— View job Review complete ✅Verdict: ship — no inline findings.
SummaryThe change removes the per-move
No cross-cutting concerns beyond what's noted above. |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24786/wasm-skia-net9/index.html |
|
|
Uno.Templates@*-* now resolves to 7.0.0-dev.17, so MyApp is built on 7.0 packages and the locally built 6.x RemoteControl client never connects. Mirrors the master ignore (37dc650). Refs #24800 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014RHVD5sbb5nMHzf8Lu24gZ
|
Claude finished @MartinZikmund's task in 2m 11s —— View job Review completeVerdict: fix-first — 1 inline finding (unrelated-scope test disable), core perf fix is sound.
SummaryIssues by severity: 0 critical/high, 1 medium (scope/root-cause), 0 low. The core change — dropping the per-move
Cross-cutting concern (see inline comment): the third commit disables |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24786/wasm-skia-net9/index.html |
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
GitHub Issue: closes #24784
PR Type:
🐞 Bugfix (performance)
What changed? 🚀
Win32Accessibility.OnSizeOrOffsetChangedraised a UIABoundingRectangleproperty-changed event for every element whose visual moved or resized. On most desktops a UIA client is listening (PowerToys, TextInputHost and Chromium browsers all register as one;UiaClientsAreListening()returnedtrueon the test machine). So every scroll frame paid a nativeUiaRaiseAutomationPropertyChangedEventcall per realized element, and a listener gate alone would not help.WinUI never raises this event on layout.
CUIAWrapper::get_BoundingRectangleserves it on demand, and nothing indxaml/xcpraisesBoundingRectanglechanges. This PR drops the per-move raise to match.RaiseAutomaticPropertyChangeson move (IsOffscreen/Name/…) is unchanged, since WinUI does the equivalent from its layout pass.Backport of the master fix.
Measurements 📊
ItemsRepeater+UniformGridLayout, 2,837 FluentButtontiles, 12 × 60ChangeViewsteps of 40 px, Skia Win32. UI-thread time fromdotnet-tracedotnet-sampled-thread-time(6.8 build, on top of the damage fix):What remains is
NotifyPropertyChangedEventfrom recycledTextBlocktext changes, which WinUI raises as well.PR Checklist ✅
Screenshots Compare Test Runresults.Validation
Given_Win32Accessibility8/8, including the newWhen_Element_Moves_BoundingRectangle_Is_Current, which checks that a client pulling bounds after a move gets the new position. The widerWindows_UI_Xaml_Automationrun hit the known pre-existing secondary-window teardown crash (WglCurrentContextDisposable.Dispose→GetErrorMessagenull); every test before that passed.Uno.UI.Runtime.Skia.Win32built withoutUnoFastDevBuild, so analyzers ran, on master and 6.8.🤖 Generated with Claude Code
https://claude.ai/code/session_01AzHtsXz33DcziPre7h3b9f