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

RadSearchBox is performing slow in filtering

1 Answer 162 Views
SearchBox
This is a migrated thread and some comments may be shown as answers.
Neil
Top achievements
Rank 1
Neil asked on 14 Jul 2017, 05:25 AM

Hello Forum, 

I haven't seen this on the forums much so I am guessing this is a rare occurrence. We have a database with over 100,000 records and have the property set to "StartWith". When typing the letter "a" there is a 5-6 second delay before the dropdown appears and is populated. We are setting the datasource with a datatable containing only two fields (Description, ID). Our SectionList property is a datatable that when it's not populated will send a query call to SQL Server obtaining the data and then returning the datatable. The process of returning the datatable is fairly fast but the overall process is rather slow. I was wondering what suggestions you all may have.

Thanks

Here is the control itself

<telerik:RadSearchBox ID="cboSection"

runat="server"
            Width="300"
            Height="400"
            Skin="Bootstrap" 
            DataTextField="Description"
            DataValueField="ID"
            MaxResultCount="10"
            DropDownSettings-Width="400"
            LabelWidth="100%"
            OnClientLoad="cboSection_OnClientLoad"
            OnSearch="cboSection_Search"
            Filter="StartsWith">            >
        </telerik:RadSearchBox>

Server Side:

    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            cboSection.DataSource = Settings.Section.SectionList;
        }
        catch (Exception ex)
        {

        }
    }

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 19 Jul 2017, 08:07 AM
Hello Neil,

The generation of the hundreds of HTML elements for the results from the search requires a lot of browser processing time. That explains the delay before the dropdown is opened. 

To optimize the SearchBox, one option is using a MinFilterLength that would make a search only if the count of typed symbols is equal or more than the value of the MinFilterLength property. 

Another optimization is using the OnDataSourceSelect event or setting the MaxResultsCount property as demonstrated in the RadSearchBox - Telerik ASP.NET SearchBox online demo.

I would like to focus your attention also on the RadComboBox with load-on-demand and virtual scrolling functionalities. Using them you would be able to load the items in portions. You can refer to the ComboBox - Load on Demand Modes demo and the ShowMoreResultsBox/Virtual Scrolling help article for live examples and additional information.

Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
SearchBox
Asked by
Neil
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or