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

Improve AutoCompleteBox performance #12338

Merged
merged 3 commits into from
Aug 29, 2023

Conversation

timunie
Copy link
Contributor

@timunie timunie commented Jul 26, 2023

What does the pull request do?

tries to improve AutoCompleteBox performance

What is the current behavior?

The control gets slow and even worse can block the UI for several seconds if the ItemsSource is huge

What is the updated/expected behavior with this PR?

Filtering feels more performant, UI does not freeze

How was the solution implemented (if it's not obvious)?

1. Made filtering async * Had to revert this. The new implementation still feels more performant than before.
2. Made filtering cancelable (in private only for now) and thus an ongoing filter action can be cancelled for a newer filter string

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

Fixes #11867

timunie added 2 commits July 26, 2023 15:26
Unfortunately, making AutoCompleteBox async is a heavy lifting. Tests are failing --> Revert it for now.
@timunie
Copy link
Contributor Author

timunie commented Jul 26, 2023

Note: This solution works best with a minimal PopulateDelay set, for example MinimumPopulateDelay="0:0:0.5"

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0038126-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0038246-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added this pull request to the merge queue Aug 29, 2023
Merged via the queue into AvaloniaUI:master with commit c20affb Aug 29, 2023
@timunie timunie deleted the fix/AutoCompleteBox_Performance branch August 29, 2023 13:55
@timunie timunie added the backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch label Sep 29, 2023
grokys pushed a commit that referenced this pull request Oct 2, 2023
@grokys grokys added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When using AutoCompleteBox, it freeze when inputting anything with a large amount of data.
4 participants