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

[Bug Report][3.7.4] v-autocomplete laggy when using "select all" #20703

Closed
clement-hyperplan opened this issue Nov 15, 2024 · 1 comment · Fixed by #20937
Closed

[Bug Report][3.7.4] v-autocomplete laggy when using "select all" #20703

clement-hyperplan opened this issue Nov 15, 2024 · 1 comment · Fixed by #20937
Assignees
Labels
C: VAutocomplete C: VCombobox C: VSelect performance The issue involves performance T: bug Functionality that does not work as intended/expected
Milestone

Comments

@clement-hyperplan
Copy link

Environment

Vuetify Version: 3.7.4
Vue Version: 3.5.13
Browsers: Chrome 130.0.0.0
OS: Mac OS 10.15.7

Steps to reproduce

Create a simple v-autocomplete with large number of items (here 5K)

Expected Behavior

On "Select all" click, all items should be active immediately.

Actual Behavior

App freezing for several seconds before doing so.

Reproduction Link

https://play.vuetifyjs.com/#...

Other comments

It works well with a virtual-scroller and v-list-items inside. Is there any reason it's laggy with autocomplete ? Is it due to component intern logic ?
If so, is there any workaround for large sets of items like this one ?

Thank you in advance !

@MatthewAry MatthewAry added T: bug Functionality that does not work as intended/expected C: VSelect C: VCombobox C: VAutocomplete performance The issue involves performance and removed S: triage labels Nov 16, 2024
@MatthewAry
Copy link
Contributor

MatthewAry commented Nov 16, 2024

VAutocomplete is an extension of VSelect. VSelect already uses a virtual scroller.. When you perform the select all operation, you replace the entire array which, from a vue perspective, is best thing you can do. It shows that there is room for improvement.

Some things that stood out after a cursory analysis on my part:

Its possible that by mapping over the entire model array, and doing join operations, and accessing nested properties within each value can cause problems. These are O(n) type operations and can slow things down.

I think there is legit room to improve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VAutocomplete C: VCombobox C: VSelect performance The issue involves performance T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants