19 Commits

Author SHA1 Message Date
chinboy 809e77e44c style: remove unused using directives 2026-07-31 23:45:25 +08:00
chinboy 561cc8d25f feat(Select): update size type to customizable size for improved flexibility 2026-06-22 07:49:33 +08:00
chinboy 4a60c55fc2 perf(controls): optimize flyout and layout lifecycles 2026-05-28 21:48:10 +08:00
chinboy 9379c9a0c5 perf(controls): optimize ColorPicker, titlebar and adorner lifecycles 2026-05-28 11:50:30 +08:00
chinboy 496ad0a6e8 perf(DataGrid): defer filter flyouts and fix header state 2026-05-25 14:57:16 +08:00
chinboy 7d38f4786d perf(Switch): reduce checked-state measure invalidations 2026-05-24 21:45:47 +08:00
chinboy 2b7fee1080 perf(ColorPicker): reduce open view binding and spectrum brush churn
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.
2026-05-24 19:03:35 +08:00
chinboy 5f8c583656 perf(ColorPicker): reduce click trigger subscription overhead
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.
2026-05-23 22:17:44 +08:00
chinboy c4bb0fdc7b perf(DesktopControls): add color picker baselines and fix split view 2026-05-23 16:57:53 +08:00
chinboy 601bd0de9c perf(Drawer): refine scoped layer and nested lifecycle 2026-05-23 15:48:12 +08:00
chinboy 32e528e0ba perf(WindowTitleBar): reduce caption button visibility overhead
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.
2026-05-23 14:14:51 +08:00
chinboy cbbac8cf60 perf(Breadcrumb): add baselines and fix separator propagation 2026-05-23 00:34:21 +08:00
chinboy d87d5ad501 perf(Timeline): cache indicator pens and fix pending state 2026-05-22 19:45:59 +08:00
chinboy 982bc314d4 perf(Calendar): defer inactive view cell creation 2026-05-22 13:57:24 +08:00
chinboy c7e9585044 perf(TimePicker): defer closed picker presenters
Qualification: TimePickerShowCase has 15 TimePicker and 7 RangeTimePicker declarations, 22 runtime InfoPickerInput instances, and picker open/select/hover/confirm flows are realistic per-session operations across basic, confirm, interval, 12/24 hour, variants, status, and range examples.

Avalonia source refs: .referenceprojects/Avalonia/src/Avalonia.Base/Data/TemplateBindingExpression.cs:37-43 covers TemplateBinding parent PropertyChanged updates; .referenceprojects/Avalonia/src/Avalonia.Base/AvaloniaObject.cs:407-422 covers SetCurrentValue preserving value priority semantics; .referenceprojects/Avalonia/src/Avalonia.Base/Layout/Layoutable.cs:546 covers hidden measure short-circuit, and this change keeps template visuals in axaml.

Result: TimePickerShowCase cold mean 464.82ms -> 393.11ms, repeated mean 148.79ms -> 138.48ms, repeated P95 180.65ms -> 151.63ms, repeated alloc 23617.32KB -> 23430.26KB, visuals preserved at 1230.

Verification: dotnet build tools/performances/AtomUI.GalleryPerformance/AtomUI.GalleryPerformance.csproj -c Debug --framework net10.0 --no-restore; dotnet build tools/performances/AtomUI.Performance/AtomUI.Performance.csproj -c Debug --framework net10.0 --no-restore; --verify-timepicker-states; GalleryPerformance timepicker and datepicker 10 cold / 30 repeated.
2026-05-22 09:17:18 +08:00
chinboy c2b944c2a0 fix(ListView): clear stale pagination references 2026-05-22 08:02:14 +08:00
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
chinboy 02fb0658e2 chore(performance): recover harness from Avalonia 12 drift, add suites 2026-05-21 15:47:12 +08:00
chinboy 18d0af516c feat: prepare release/6.0 with performance scenarios and gallery enhancements
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
2026-05-20 23:25:15 +08:00