ColorPickerShowCase has 23 ColorPicker/GradientColorPicker instances. The optimized path is the opened picker panel, especially repeated color spectrum, slider, palette, and gradient stop interactions within a session.
Use TemplateBinding for same-owner GradientColorPickerView template state and cache ColorSpectrum ImageBrush instances at bitmap rebuild points so HSV updates can reuse brush references.
Avalonia source references: .referenceprojects/Avalonia/src/Avalonia.Base/Data/TemplateBinding.cs:57-68, .referenceprojects/Avalonia/src/Avalonia.Base/Data/TemplateBindingExpression.cs:37-43, .referenceprojects/Avalonia/src/Avalonia.Base/Media/ImageBrush.cs:24-43.
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-colorpicker-states; git diff --check; git diff --cached --check.
Qualification: ColorPickerShowCase contains at least 20 ColorPicker controls and at least 3 GradientColorPicker controls; the default Click trigger is paid for each materialized picker and is used on every anchor pointer press.
Source model: RoutedEvent.AddClassHandler subscribes once for the target type (.referenceprojects/Avalonia/src/Avalonia.Base/Interactivity/RoutedEvent.cs:121-135), while Interactive.AddHandler creates per-control event subscription storage (.referenceprojects/Avalonia/src/Avalonia.Base/Interactivity/Interactive.cs:30-41,179-190).
Measurement: Release net10.0, --suite colorpicker --count 300, 3-run median. ColorPicker.GalleryShape ms/item 12.548 -> 11.593 (+7.61%), KB/item 3826.1 -> 3811.7 (+0.38%); suite sum ms/item 19.353 -> 18.254 (+5.68%), KB/item 5770.5 -> 5753.2 (+0.30%).
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-colorpicker-states; git diff --check.
WindowTitleBar is used by the main Window, Dialog, and ImagePreviewer paths; a normal Gallery session keeps one workspace title bar resident and materializes transient dialog/image title bars when those flows open. CaptionButtonGroup is created by each title bar, with visibility state recalculated during window materialization and maximize/fullscreen/pin state changes.
Replace caption-button MultiBinding converters with direct effective visibility properties, remove extra arrange invalidation registration, clear template handlers on detach/re-template, and avoid duplicate Windows caption corner radius writes.
Measured with three alternating count=160 windowtitlebar runs: CaptionButtonGroup Windows states improved 6.4%-7.0% ms/item and 3.4%-4.3% KB/item, with Visual/root unchanged.
Verification: dotnet build tools/performances/AtomUI.Performance/AtomUI.Performance.csproj -c Debug --framework net10.0; dotnet run --project tools/performances/AtomUI.Performance/AtomUI.Performance.csproj -c Debug --framework net10.0 --no-build -- --verify-windowtitlebar-states.
Adds the performance harness, state-verification suites, gallery
showcases and reference docs accumulated for the 6.0 release, plus
control-level fixes:
- tools/performances/AtomUI.Performance + AtomUI.GalleryPerformance
scaffolding with per-control scenarios and verification suites
- docs/performances/** baselines and plans
- controlgallery/** showcase data refreshes (icon gallery, range time
pickers, multi-select cascader strategies, etc.)
- ListBox: re-apply filter on OnLoaded when FilterValue is preset
- SelectCandidateList: visible-item selection mapping under filter
- RangeDatePicker: floating popup arrow even with IsShowTime=true