This is a migrated thread and some comments may be shown as answers.

Performance

2 Answers 102 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
n/a
Top achievements
Rank 1
n/a asked on 12 Aug 2019, 04:58 AM

Why is performance so good for this control? I'm loading 23,000 search items into an ObservableCollection, and search response is almost instantaneous.

This may seem like an odd question, but in preparing to work with this control, I found a few online complaints about performance and a suggestion to trigger virtualization by setting the MaxHeight property of the inner ListBox, as follows:

<Style x:Key="AutoCompleteBoxStyle" TargetType="{x:Type toolkit:AutoCompleteBox}">
    <Style.Resources>
        <Style TargetType="{x:Type ListBox}">
            <Setter Property="MaxHeight" Value="200" />
        </Style>
    </Style.Resources>
</Style>

I found that this wasn't necessary, and as I hate mysteries, I'm wondering if Telerik has taken care of all performance issues (say by automatically triggering virtualization) since the time of the complaints.

If this isn't the case, and I can expect to run into performance problems with a larger number of search items, are there any standard techniques to address such eventual problems?

Wayne

2 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 14 Aug 2019, 08:53 AM

Hello Wayne,

The performance issues when it comes to big amount of items usually comes from the lack of UI virtualization. If your search brings (lets say) 5000 items and they all have to be rendered, the performance will be noticeably bad. Those situations are resolved using UI virtualization. This way only the items that are visible in the viewport are rendered (usually around 10 items) which brings very fast performance.

If you place a control that implements a UI virtualization in a panel that measures its children with infinity, like StackPanel, performance issues occur. This is because those panels gives they children as much space as they need to render all its contents, thus disabling the virtualization. This is why the MaxHeight workaround is suggested. In this case, you manually restrict the height of the control and force the virtualization. 

The autocompletebox dropdown uses RadListBox which has UI virtualization enabled by default, so this is why the control works fast on your side. However, if you hit any issues you can post them in the forum or open a new support ticket.

Regards, Martin Ivanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
n/a
Top achievements
Rank 1
answered on 14 Aug 2019, 09:11 AM
Thanks for the response. I'll post another question if I run into difficulties, but performance is really quite impressive to this point.
Tags
AutoCompleteBox
Asked by
n/a
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
n/a
Top achievements
Rank 1
Share this question
or