Choices-js / Choices

A vanilla JS customisable select box/text input plugin ⚡️
https://choices-js.github.io/Choices/
MIT License
6.24k stars 615 forks source link

400 items - Performance issues - Slow #816

Closed alvarotrigo closed 2 months ago

alvarotrigo commented 4 years ago

Describe the bug

With a list of 400 issues I experiement performance issues when working with the single select box when:

To Reproduce Go here: https://codepen.io/alvarotrigo/pen/PowgMmw Search for a text such as "flkjadslkfjaslfjlakjf" Or just click on any item in the list, you'll notice how it doesn't close as fast as expected.

Screenshots See a video here: video

Desktop (please complete the following information):

alvarotrigo commented 4 years ago

Just as a note. The same list seems to work smoothly in Select2. So I assume the issue can be dealt with somehow.

abarrak commented 4 years ago

Still an issue in choicesJS @alvarotrigo .. I wonder weather the root cause the highlight behavior and how to disable it ..

Xon commented 3 months ago

This appears to be something todo with the css/html for the select-select mode. The multi-select works fine.

I actually prefer the multi-select UI even for single item, so I've hacked that into my own fork. The documentation (and config name) will need some cleanup.

Xon commented 3 months ago

There was an O(N^2) behavior in search, since v11.0.0-rc8 was deployed it looks to be working better.

There is a stall when stopping search, but an that is because it is re-rendering all the choices