microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
105.15k stars 6.2k forks source link

[Settings][Run] Improve XAML and settings page loading #32643

Closed davidegiacometti closed 1 week ago

davidegiacometti commented 3 weeks ago

Summary of the Pull Request

PR Checklist

Detailed Description of the Pull Request / Additional comments

Introducing templates for plugin options didn't really improve page load time so I investigated a little bit. I profiled the page loading using ItemsControl and ItemsRepeater (the second one uses virtualization). Here is the comparison with a Debug build and 24 plugins loaded:

ItemsControl ItemsRepeater

The loading speed improvement it's clearly visible.

Validation Steps Performed

Manually tested Run settings page:

Jay-o-Way commented 3 weeks ago

Any graphic changes? (looking at <Rectangle Style="{StaticResource OptionSeparator}" />)

davidegiacometti commented 3 weeks ago

Any graphic changes? (looking at <Rectangle Style="{StaticResource OptionSeparator}" />)

No visual changes. This is https://github.com/microsoft/PowerToys/blob/41a0114efe903b268b5a2ed27a33b423aa9910ea/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerLauncherPage.xaml#L644-L648

Jay-o-Way commented 3 weeks ago

I was thinking DividerStrokeColorDefaultBrush coulda be nice as a separator too.