chinboy
|
3e21a87670
|
perf(TreeView): reduce switcher icon presenter overhead
Qualification: TreeViewShowCase has 15 TreeView declarations, 87 declared TreeViewItem nodes, and 55 runtime tree rows; page navigation, expand/collapse, search/filter, drag, and context-menu flows are realistic per-session operations.
Avalonia source refs: .referenceprojects/Avalonia/src/Avalonia.Controls/Primitives/TemplatedControl.cs:333 and :338 cover template tree creation; .referenceprojects/Avalonia/src/Avalonia.Base/Layout/Layoutable.cs:546 and :624 cover hidden measure short-circuit after creation.
Result: TreeViewShowCase cold mean 1049.62ms -> 776.51ms, repeated mean 332.44ms -> 213.41ms, repeated alloc 49964.64KB -> 33732.33KB, visuals 2108 -> 1646, IconPresenter 332 -> 112.
Verification: dotnet build src/AtomUI.Desktop.Controls/AtomUI.Desktop.Controls.csproj -c Debug --framework net10.0; dotnet build tools/performances/AtomUI.Performance/AtomUI.Performance.csproj -c Debug --framework net10.0; --verify-treeview-states; GalleryPerformance treeview 10 cold / 30 repeated.
|
2026-05-21 22:23:44 +08:00 |
|