Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combobox performance with high number of items #5073

Closed
audinowho opened this issue Nov 19, 2020 · 3 comments
Closed

Combobox performance with high number of items #5073

audinowho opened this issue Nov 19, 2020 · 3 comments

Comments

@audinowho
Copy link

I'm using Combobox and recently ran into performance issues, with list load lagging at ~3000 items. WPF solves this by using VirtualizingStackPanel: https://stackoverflow.com/questions/8198645/wpf-combobox-performance-problems-by-binding-a-large-collections

However, the above xaml has no effect when ported directly to AvaloniaUI. Is there an alternative in this library?

@maxkatz6
Copy link
Member

Make sure that you set VirtualizationMode="Simple" on the ComboBox. Otherwise it will add all 3000 items to the tree. Default is "None".

@grokys what do you think, should we use ItemsRepeater for controls like ComboBox now (~0.10.1), or should we wait for #4779 ?
Right now it will give us better virtualization/performance in the standard controls, but it will cause breaking changes.

@audinowho
Copy link
Author

Works perfectly and much simpler than the WPF answers. Thanks!

@grokys
Copy link
Member

grokys commented Nov 20, 2020

what do you think, should we use ItemsRepeater for controls like ComboBox now (~0.10.1), or should we wait for #4779

Not sure there's any simple way to use ItemsRepeater for controls like ComboBox without something like #4779 and that PR is delayed waiting on fixes to upstream ItemsRepeater (microsoft/microsoft-ui-xaml#1829 in particular). And like you say it's going to be a huge breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants