indrimuska / angular-selector

A native AngularJS directive that transform a simple <select> box into a full html select with typeahead.
http://indrimuska.github.io/angular-selector
MIT License
96 stars 36 forks source link

Question about performance with 500+ options #39

Open sugaaloop opened 8 years ago

sugaaloop commented 8 years ago

I'm having performance issues when the option list is 500+ in size, any suggestions of how I could research improvements? Love the tool, by the way.

Nishchit14 commented 8 years ago

You can use remote option and fetch data on demand rather than loading all data first.

sugaaloop commented 8 years ago

Thanks for the idea @Nishchit14, however, loading data is not the bottleneck. Creating the select, and I suppose the several ng-repeats, is where the slowdown occurs.

indrimuska commented 8 years ago

Yes @sugaaloop, I think so too, but I don't have the time to understand how to pack a fix to improve performances. If you have any idea or you are interested in contribution you're always be welcome! :)

andreialecu commented 8 years ago

You can still use the remote option and filter your options within it to only return a few of them that match the user input, instead of the huge list.

jeeyyy commented 6 years ago

This is fixed in a high performance variant/fork of the same component: https://github.com/jkodu/angular-selector-on-steroids

Refer enhanced example page - https://jkodu.github.io/angular-selector-on-steroids/ (allow unsafe scripts).