I have two UltraCombo controls which display a DataTable with many records (more than 10K). Opening a form with these two controls is very slow becuase setting a Text on UltraCombo controls takes a long time.
Why does it take a long time? Because, it seems to me that UltraCombo sorts the items the first time I set its text. My profiler indicates that when showing the form, 93.28% of the time is spent on two calls on set_Text method of UltraCombo (this method calls SelectedIetmChangeHelper on UltraCombo, which calls GetValue on UltraDownBase etc ... )
My question is, how can I prevent UltraCombo from sorting the items (because I could sort them (faster) in DB and provide them in sorted order).
My two UltraCombo display the same content (data table), it makes no sense to sort it twice ...
Thank you,
Hi,
This is most likely caused by the DropDownSearchMethod property. This property defaults to Binary, which means that the control builds a sorted list of the values in the DisplayMember and ValueMember fields to improve the performance and responsiveness of the user interaction with the control. The down side of this is a small performance hit when the list is initially built.So it's a trade-off.
If you don't want this, you could set the property to Linear, which means it will not build the sorted lists, but it will be slower-performing when the user types into the Combo, since it has to do a linear search.