You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a weird performance problem with the AutoCompleteBox.
To illustrate the problem, I have generated a list with the 1000 strings A0 to A999.
When I enter the character A, the list opens with 1000 items.
The first time the list opens, it takes an unacceptably long time, of 5 seconds or more.
After that it opens much more quickly.
I have observed:
The delay is dependent on the number of items in the drop down list. If there are 100 items there is no significant delay.
The delay happens once only in my application.
If I have two AutoCompleteBoxes, the delay occurs on opening the first one of them, but not the second one.
This remains true if the first one has only 100 items, but the second one has 1000 items.
This combination is strange, because it appears to be a one-off action (like loading a DLL), but the duration is dependent on the the number of items (not at all like loading a DLL).
In my application I am actually populating the list dynamically from a database (in the Populating event).
My current strategy is to limit the number of items to 100 for the initial load, but then to limit it to 1000 for subsequent loads. That kind of works, but I'm not really happy with it.
I have no idea if this effect is due to a problem in the AutoCompleteBox, or a more general problem in WPF.
At present, I am quite baffled and don't have a good idea about how to debug the issue.
I have a weird performance problem with the AutoCompleteBox.
To illustrate the problem, I have generated a list with the 1000 strings A0 to A999.
When I enter the character A, the list opens with 1000 items.
The first time the list opens, it takes an unacceptably long time, of 5 seconds or more.
After that it opens much more quickly.
I have observed:
If I have two AutoCompleteBoxes, the delay occurs on opening the first one of them, but not the second one.
This remains true if the first one has only 100 items, but the second one has 1000 items.
This combination is strange, because it appears to be a one-off action (like loading a DLL), but the duration is dependent on the the number of items (not at all like loading a DLL).
In my application I am actually populating the list dynamically from a database (in the Populating event).
My current strategy is to limit the number of items to 100 for the initial load, but then to limit it to 1000 for subsequent loads. That kind of works, but I'm not really happy with it.
I have no idea if this effect is due to a problem in the AutoCompleteBox, or a more general problem in WPF.
At present, I am quite baffled and don't have a good idea about how to debug the issue.
By the way, I have two test programs in my own fork of the repository:
https://github.com/PhilJollans/WpfToolkit/tree/master/WpfToolkit/AutoCompleteTest2
is a very basic example with three AutoCompleteBoxes.
https://github.com/PhilJollans/WpfToolkit/tree/master/WpfToolkit/AutoCompleteTest
is approximately the strategy that I am using in my application.
The text was updated successfully, but these errors were encountered: