-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Memory leak with component with input with v-model #10004
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
Comments
@posva After further testing. This might not be Vue's fault. Testing the code above on Chrome Version 72.0.3626.121 (mac) seems to run without any issues and VueComponent count is stable. |
it isn't in 74. It could be a bug on Chrome. I've found leaks in the past (https://bugs.chromium.org/p/chromium/issues/detail?id=949587). I didn't test with this one though as it looks like Vue is retaining the component and the browser cannot free it |
I can confirm this happens in Chrome 74. When trying to replicate this in Safari, I cannot even see any Vue related objects in their JS allocations inspector, but that is probably just my mistake somehow. However, if this doesn't happen in the earlier versions of Chrome with the same Vue version, this could be probably forwarded to Chromium project and closed here? |
This is especially critical when we talk about large SPA's with tones of data. As far as I can see Chrome 74 is not able to collect much... |
https://bugs.chromium.org/p/chromium/issues/detail?id=961494 There is some development regarding this issue. |
@posva or anyone knows how to test this with FF devtools and EDGE devtools? |
Thanks for checking it out! |
Does anybody know if this also happens in the PROD version? As I am not able to filter by "vue" components in Chrome DevTools. I see the same code as the dev version though... |
@clopezcapo Yes it does. |
Bufff, and isn't that a huge issue for PROD environments? It looks like is a serious potential killer to me. Does anybody know if they are aware? |
@posva can you please update us on the status of this fix? As still happens in PROD. |
this issue is too serious, it take me a long time to find it out... |
So... any workarounds so far? Downgrade to v2.6.9? |
I can confirm that PR #10085 fixes it for us as well. Is there a plan to merge this? |
I also tried this solution, but only half of it worked. chrome80/vue2.6.11/vue-router 3.0. |
This comment has been minimized.
This comment has been minimized.
As a workaround, I wrap my inputs to:
This way 'only' the inputs (which have been edited) itself leak and not the whole component / view. Simplified:
|
Thanks for using Chrome! And sorry for bothering you... m(_ _)m Chrome Canary 93.0.4535.2 (at leas) clears undo stack for removed , <textarea> content editable. So, undo stack is no more source of memory leak. (http://crbug.com/961494) I attempt to take memory snapshot for posva's sample. Retainers of "Detached HTMLInputElemnt" are:
Note: You can make I'm not sure Blink roots of 6 and 7. One of Blink roots may be caused by Anyway, Detached HTMLInputElement is only one, so memory issue is mitigated. |
Version
2.6.10
Reproduction
Steps to reproduce
What is expected?
VueComponent count should be stable
What is actually happening?
VueComponent count keeps increasing.
seems to be related to typing in the input
The text was updated successfully, but these errors were encountered: