-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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] high performance impact when using a lot of v-text-field #6201
Comments
I have noticed this in the past as well with many v-select elements, even when they all had the same |
Any news on this? It really blocks my app development as I don’t know if I can rely on classic usage of v-model. |
I also encountered performance problems when using many v-selects. |
maybe related to vue: vuejs/vue#6898 |
We have to found a workaround. it make Vuetify useless in case of consequent forms usage by lambda people. we are developer and many of us have decent computer but it's not always the case for most users. |
Yeah seems like an upstream vue issue, tracked in vuejs/vue#6351. I guess we will have to wait untill 3.0 : / |
@MajesticPotatoe Hi ! why removing "critical" tag ? It's a Vuetify usage breaker for big form ! In my case the front as to be used by any surfer with any computer / phone configuration and the laggy input due to this bug are so bad that it will let the users with the filling of no confidence in the service. |
It might be a good idea to at least keep it pinned. That way us developers can become aware of the issue if they encounter it and help encourage a resolution. |
@stygmate mis-click, fat fingers. |
vuejs/vue#5155 I think this bug has already been discovered a while ago. I don't think we will be seeing a fix in Vue 2 as they are declaring it as expected behavior. |
@MatthewAry so i think the correct way to react is to code a WorkAround 💡 |
Inputs are being updated as part of v2.0 and I will be looking to see if there are things we can do to alleviate this burden. Thank you for your patience. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The issue still there, the workaround that works for me was split big form components into smaller ones, and use vuex to store form value. It will decrease lot of performance issue. |
@Mikilll94 yes it works, click my link you can find tests there. You can still have one big form send at once but keep inputs as a separate sub-components then during typing it will be re-render only focused input. |
I saw your examples on Stack Overflow. Now I understand better this problem in Vue.js.
I don't understand that. What I should do? Put inputs in groups and make a separate component for each group? This is not very convenient during development. |
* fix(perf): avoid useless re-render on parent update fixes #6201 see vuejs/vue#7257 and vuejs/vue#10115 * test: disable sync see vuejs/vue-test-utils#1130 * test: disable more sync, skip unfixable tests * Update packages/vuetify/src/mixins/binds-attrs/index.ts Co-Authored-By: John Leider <[email protected]>
Wow! Congrats! It's awesome that this problem was solved. Do you plan to include these changes also in Vuetify 1.x? Because for medium and large projects migrating from 1.x to 2.x is very difficult. |
It's a pretty simple task, just monotonous. I'm very swamped atm with the upcoming release so unless @KaelWD wants to do it, it would have to wait until next month unless someone wants to PR it. |
Do you think it's a good idea to close this issue while the PR has 30 tests disabled? |
@johnleider, @KaelWD , can anyone confirm (or NOT) if the FIX will be applied to 1.5 branch? |
No we cannot confirm. It may or may not be done at some point eventually. |
Is this patch already included in 2.1.x? |
yeah pretty sure this landed in 2.1.0 |
I am currently using 2.1.0 but v-text-field has still performance issues. Input lag starts when I reached 40 and so on (my v-text-field is dynamically appended) |
I am in the same situation, but my case is with v-select. I think I'm going to make a light homemade component ..... Real solution for this! |
Same issue, I did change to bind value and use |
@KaelWD why this issue is closed as it don't seems to be resolved ? I understand that it is an upstream issue, but maybe you can provide an integrated workaround. |
the issue is closed because it did improve a lot in the 2.1.0 release, but maybe it is still not enough for some people. Vue 3.0 might allow for further performance improvements. |
https://vuejs.org/v2/guide/components-custom-events.html#Customizing-Component-v-model
I made new component that doesn't update model when input event is fired. |
Still experiencing the same problem on Vue Working solution I came up with is to wrap (at least) the part containing the |
Versions and Environment
Vuetify: 1.4.2
Vue: 2.5.22
Browsers: Google Chrome
OS: Mac OS 10.13.6
Steps to reproduce
just input one char in one of the field while doing performance recording in chrome devtools.
Mesurement 1: with the exact codepen
Mesurement 2: removing all text-field except one
Mesurement 3 only one text-field but with @input="(value)=>this.field1=value" (for having just one half of the v-model behaviour)
Mesurement 4: with the 20 text-field replaced by standard input
Expected Behavior
Only have one text-field updated on each keypress.
Actual Behavior
Mesurement 1: 21,54ms
Mesurement 2: 2,98ms
Mesurement 3: 0,98ms
Mesurement 4: 1,94ms
Reproduction Link
https://codepen.io/stygmate/pen/zyVagj
Other comments
I test here with only 20 text-field but in my app i have 20 text-field by people concerned by the form and the mesurement are done on a macbook pro 2018. On my phone huawei p9lite typing on keyboard in a field can lag a lot.
The text was updated successfully, but these errors were encountered: