2

I'm using UI Select control in my application(source - https://angular-ui.github.io/ui-select/). It has a major performance issue(lagging when populated wuth over ~2000 items). Tried using also mdAutocomplete(source - https://material.angularjs.org/1.1.2/api/directive/mdAutocomplete) since it already supports virtualization but the problem with this one is that it creates a huge amount of watchers(if list has 5000 items it creates ~15000 watchers although only 20 items are rendered at a time). Any insights regarding how to solve this performance issues in any of the control. I'll note i have to support a large amount of items - ~10K items.

Thanks for your help!

3
  • 1
    Make sure you have order by in your ui-select-choices iteration loop Commented Mar 28, 2017 at 9:51
  • you mean in the repeat statement? Commented Mar 28, 2017 at 10:30
  • yes, in repeat. Commented Mar 28, 2017 at 10:36

1 Answer 1

2

there is no direct solution for this but yes a good workaround is available: limit your dropdown results to a particular number unless it is been search..exa.

repeat="username in users | filter: $select.search | limitTo: ($select.search.length <= 1) ? 50 : 20">

Or some other logic. In any case, showing 10K results in dropdown at a time is not even useful for user.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.