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

Very slow list load and drop down, 15k items

8 Answers 354 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
mark leavesley
Top achievements
Rank 1
mark leavesley asked on 11 May 2010, 10:08 AM
Hello,

I have a problem with the RadCombo and large lists. I've had a look at some other threads but they are quite old.

The combo is populated by AJAX and uses the checkbox item template found elsewhere in the forums. If I load 15,800 items in IE it takes 2 minutes before the browser is usable. The server time to generate the dataset is 3-4 seconds, there seems to be about 20s of other server time as noted by watching the server process in task manager the rest is IE running at 100% CPU. After this time when I click on the drop down I still have to wait 15 seconds for the drop to actually appear with content. Chrome is much faster, 1:15 rather than 2 minutes and almost instantaneous to get the drop down to appear. I also have a loading panel and the spinny (WebBlue) stops after 25 or so seconds, again presumably because the AJAX has finished and it's waiting for the browser to do whatever.

This is the combo:

 <telerik:RadComboBox ID="str_name_campaign" runat="server" oncopy="return false;" 
                                                onpaste="return false;" oncut="return false;" xonkeypress="return tabOnly(event)" 
                                                onmousewheel="return false" OnClientDropDownOpening="OnClientDropDownOpening" 
                                                OnClientDropDownClosing="OnClientDropDownClosing" OnClientSelectedIndexChanging="OnClientSelectedIndexChanging" 
                                                OnClientBlur="OnClientBlur" Width="490px" AllowCustomText="True" ChangeTextOnKeyBoardNavigation="False" 
                                                AutoCompleteSeparator=";" MarkFirstMatch="true" CssClass="cssradtextbox" DataTextField="str_item_name" 
                                                DataValueField="str_item_code" EnableLoadOnDemand="false" OnClientLoad="OnClientLoad"
                                                <ItemTemplate> 
                                                    <asp:CheckBox ID="CheckBox1" runat="server"/> 
                                                </ItemTemplate> 
                                                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                                            </telerik:RadComboBox> 

This is the server code:
  Protected Sub str_name_campaign_ItemDataBound(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadComboBoxItemEventArgs) Handles str_name_campaign.ItemDataBound 
    ComboItemBound(sender, e) 
  End Sub 
 
  Private Sub ComboItemBound(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadComboBoxItemEventArgs) 
    'Add each combo checkbox to the Handler 
    Dim objl_CHECKBOX As CheckBox 
 
    objl_CHECKBOX = CType(e.Item.FindControl("CheckBox1"), CheckBox) 
    objl_CHECKBOX.Attributes.Add("onclick""checkboxClick('" & CType(sender, Telerik.Web.UI.RadComboBox).ClientID & "');"
    objl_CHECKBOX.Text = CType(e.Item.DataItem, Data.DataRowView).Item("str_item_name").ToString & " - " & CType(e.Item.DataItem, Data.DataRowView).Item("str_item_code").ToString 
  End Sub 
 

If I comment out ItemDataBound, it is slightly faster, but only a few seconds. Getting the dropdown is 50% faster though albeit I have checkboxes and no text.

What can I do to speed this up? The client wants IE rather than Chrome, so that option is out. We are looking at additional filtering options but it could be quite legitimate for the client to want all 15,800 items in the list.

Ideally the combobox needs to be fully searchable (rather than just starts with) and multiple select with checkboxes, but I don't seem able to get all these options to work together.


Regards,
Mark Leavesley

8 Answers, 1 is accepted

Sort by
0
mark leavesley
Top achievements
Rank 1
answered on 11 May 2010, 11:17 AM
I've looked at the load on demand options and I can't see how that would work when the data source itself is dynamic. There are several combo boxes on the page which all filter a common data source. If a filter changes then the data source is regenerated using the values of all the combo boxes as the filter in the source SQL. The combos are repopulated by using DataTable.DefaultView.RowFilter and DataTable.DefaultView.ToTable to generate tables of values for each combo.

As far as I can tell, to use load on demand the datasource must be declared in advance, which would complicate matters enormously I think.
0
Simon
Telerik team
answered on 12 May 2010, 04:51 PM
Hi mark leavesley,

Although it may seem unexpected at first, RadComboBox initialization is heavy when a high number of Items are loaded at once. If it is a requirement to show so many Items, the best way to handle it is to use Load On Demand as in this way only the minimum, filtered set of Items (and data) will be loaded and initialized at once.

Instead of binding each RadComboBox on Page Load for instance, you can do this in its ItemsRequested event handler (with LOD and even paging enabled). Can you please explain in more detail why a LOD configuration is unacceptable in your case? 

Sincerely yours,
Simon
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
mark leavesley
Top achievements
Rank 1
answered on 13 May 2010, 08:09 AM
Hello,

LOD is fine, but it negates the ability to search within text rather than just at the beginning. I presume this is because searching within is entirely client side and therefore the list must be fully loaded.

I've since redone the page using LOD and binding the filtered data sources on each page load. It works very well, but we do of course loose the ability to search within text. I think that is a compromise we will have to accept for now, though I struggle to understand why you can't do it server side when you can do starts with server side.

Regards,
Mark Leavesley
0
Simon
Telerik team
answered on 19 May 2010, 12:16 PM
Hi mark leavesley,

The criterion against which data is filtered is defined in the ItemsRequested event handler of the RadComboBox. In there you can filter data in any way you want.

If you are referring to the Filter property and the filtering functionality it enables, the latter is working solely on the client-side and on the Items that are already loaded in the control.

As I am still unable to fully picture your requirement and the issue at hand, can you please explain them to me in more detail?

Greetings,
Simon
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
mark leavesley
Top achievements
Rank 1
answered on 19 May 2010, 03:17 PM
Hello,

We want the filter option of 'contains' to work with automatic load on demand. If I have to write code to do it then surely it defeats the purpose of the codeless automatic load on demand? From a technical point of view, I can't see why it's not an option.

If you do it enough times you can see that it DOES do a 'contains' search (it bolds the characters you are typing ANYWHERE in the list text) but then clears itself and does the 'startswith' match. I am guessing that the client and server side filters are operating at the same time.

Regards,
Mark Leavesley


0
Simon
Telerik team
answered on 20 May 2010, 12:27 PM
Hi mark leavesley,

Thank you very much for clarifying.

We were aware of the Filter and Automatic Load On Demand issue and fixed it with the Service Pack we released yesterday.

Please upgrade to take advantage of the fix and let me know should you have additional questions.

Greetings,
Simon
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
mark leavesley
Top achievements
Rank 1
answered on 20 May 2010, 12:40 PM
Hello,

I think that's the best news I've had all week!

Can I get email notifications when there are product updates? I had no idea...


Regards,
Mark Leavesley
0
Simon
Telerik team
answered on 20 May 2010, 02:00 PM
Hello mark leavesley,

We do not send notifications about minor releases, still you can track the release history (and know when a new release is out) here.

Have a great day,
Simon
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ComboBox
Asked by
mark leavesley
Top achievements
Rank 1
Answers by
mark leavesley
Top achievements
Rank 1
Simon
Telerik team
Share this question
or