Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Autocomplete] slow/hangs when using more then +1000 items and grouped choices #2280

Open
Bartheyrman22 opened this issue Oct 17, 2024 · 4 comments

Comments

@Bartheyrman22
Copy link

Bartheyrman22 commented Oct 17, 2024

The ux-autocomplete mutation-observer is triggered when selecting items from the list. I believe only in multiple/grouped-choice mode.
This hangs the page/browser when using enough items in the list. (+1000)
By removing the mutation-observer, the widget becomes fast again.

@smnandre
Copy link
Member

I'm sorry, are you really talking about 1000 items in the list ?

@smnandre smnandre changed the title ux-autocomplete is slow/hangs when using more then +1000 items and grouped choices. [Autocomplete] slow/hangs when using more then +1000 items and grouped choices Oct 17, 2024
@Bartheyrman22
Copy link
Author

Bartheyrman22 commented Oct 17, 2024

Yes, tom-select advertises for being performant with 15.000 items.
And for me personally, it is working fast for +/-1000 items. So no need for Ajax in this case (maybe not best practice).
And if ux-autocomplete hangs on 1000 items it will probably be slow on 100 items?

And wondering, is there a way to make the MutationObserver more specific? For instance not triggering on Select-events?
Another possibility is that the controller does some DOM changes that triggers the MutationObserver. All in this specific case (multiple/grouped). I saw some select-items disapppearing and added on other places, operations that don't occur when using the tom-select without the ux-controller.

@smnandre
Copy link
Member

Wow i did not know this was even doable :)

Do you feel to investigate this problem and suggest maybe a PR ?

@Bartheyrman22
Copy link
Author

Bartheyrman22 commented Oct 21, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants