Files
AtomUI/docs
chinboy 2f41df5b7c perf(DataGrid): reduce row clip allocation
Reuse DataGridRow hidden clip geometry for non-recyclable hidden rows and cache DataGridRowGroupHeader child clip geometries across repeated arrange passes. Also resolve the built-in RowGroupHeader RootLayout/RowHeader template part names so row header visibility, owner wiring, and child clip lifecycle run for the shipped template.

Qualification: DataGridShowCase declares 65 DataGrid instances; row virtualization/removal paths apply to realized rows, and row group header child clipping applies to grouped grids with row headers/frozen offsets. Operation frequency: vertical scrolling, ItemsSource changes, row deletion, row clearing, horizontal scrolling, row group header layout, re-template, and detach.

Avalonia basis: Visual.Clip is a styled property registered with AffectsRender and InvalidateVisual queues dirty rendering (.referenceprojects/Avalonia/src/Avalonia.Base/Visual.cs:52-53,141-149,418-421,446-500). RectangleGeometry.RectProperty marks geometry dirty (.referenceprojects/Avalonia/src/Avalonia.Base/Media/RectangleGeometry.cs:25-33; .referenceprojects/Avalonia/src/Avalonia.Base/Media/Geometry.cs:146-172).

Verification: dotnet build -c Release -f net10.0 tools/performances/AtomUI.Performance/AtomUI.Performance.csproj; dotnet run -c Release -f net10.0 --no-build --project tools/performances/AtomUI.Performance/AtomUI.Performance.csproj -- --verify-datagrid-states; dotnet run -c Release -f net10.0 --no-build --project tools/performances/AtomUI.Performance/AtomUI.Performance.csproj -- --suite datagrid --count 100; git diff --check; git diff --cached --check.
2026-05-26 10:12:26 +08:00
..