cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 ComboBox Performance Issues

Former Member
0 Kudos

Hi,

I have the following problem:  I need to display almost 5000 items in a ComboBox control (and allow users to use search on that ComboBox).

At first i noticed only 100 items where shown, but after i use SetSizeLimit(5000) that limit disappear. The problem is that when i load the model and try to open the ComboBox it freezes for a long time and behaves weirdly after: if it opens (only sometimes) i am not able to scroll, it closes itself, etc.

What I don't understand is that if this control is not designed to show many items, then which control is, or what does SAP recomends in this matter. It's easy to say, "filter your data before binding such a large model" but doesn't really apply to my app.

Thanks

Andres Nebel

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member182862
Active Contributor
0 Kudos

This is my suggestion. I work for SAP. However, it is my personal view.

Show first 200 items and then provide a way for user to search for the items.

having 5000 items in a combobox is just too many.

Thanks

-D

Former Member
0 Kudos

Hi Dennis,

The problem is that user is filling a form, so implementing a functionallity to search for the items is kind of messy, because I either show 2 fields for any large combobox (a textbox to search and the actual combobox) or I create another screen for that search which ain't a good user experience.

Regards,

Andres

SergioG_TX
Active Contributor
0 Kudos

Andres,

I encountered a similar situation. my work around was as follows:

1) I got a json string with all the records that needed to go into the combo box... i used a JSON model instead of the OData Model so that my search would be local to an array in the model, unlike the OData model which is a server side model.

2) on another scenario i had, i allow the users to start typing on the combo box control but i only filter records after they have typed more than 2 or 3 chars in the search box, that way i can minimize the filtered results and hopefully that is under > 1000 for a faster search.

in my case i had a combo box that had approx 28k records these were my approaches. i hope this helps you in some form .

Former Member
0 Kudos

Hi Sergio!

Thank you for your comments,

1) Actually, the model i'm using is indeed a JSON model, but with 5000 items the combobox doesn't even open up..

2) I have some questions on this solution, Your combobox does not show items before the search? How did you tell the combobox to start filtering only after char n°3?  The combobox itself is who queries and filters the results, i didn't know i can override that..

Regards,

Andres Nebel