Memory leak in QSelect component with "use-input" prop enabled
See original GitHub issueWhat happened?
“use-input” prop on QSelect, wrapped in QDialog, produces a memory leak.
What did you expect to happen?
“use-input” prop on QSelect, wrapped in QDialog, doesn’t produce a memory leak.
Reproduction URL
https://jsfiddle.net/dmytro_svyrydenko/jx1trcLv/14/
How to reproduce?
- Go to the provided reproduction link.
- Go to the “Memory” tab, and select the second VM instance, where the code result is running. Make a Heap Snapshot. It will be the initial value.
- Click on the “TOGGLE” button.
- Focus on any field so that the dropdown with options is opened.
- Close the dropdown, and click “TOGGLE” to hide elements.
- Go to the “Memory” tab, and select the second VM instance, where the code result is running.
- Make Heap Snapshot (Garbage Collection is called automatically, but you can force it manually if you wish).
- Filter both initial and newly created Snapshots by “Detached”.
- See the difference in Detached elements on the page. Each repetition of steps 2-4 just increases the number of detached nodes.
Happens on both UMD and Vue CLI plugin versions. Didn’t test others.
Flavour
UMD
Areas
Components (quasar)
Platforms/Browsers
Firefox, Chrome, Safari, Microsoft Edge
Quasar info output
Operating System Darwin(22.1.0) - darwin/x64
NodeJs 12.18.3
Global packages
NPM 6.14.6
yarn 1.16.0
@quasar/cli 1.3.2
@quasar/icongenie Not installed
cordova Not installed
Relevant log output
No response
Additional context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Memory leak with component with input with v-model #10004
I can confirm this happens in Chrome 74. When trying to replicate this in Safari, I cannot even see any Vue related objects...
Read more >Input event causing memory leak - Vue.js - Stack Overflow
It relates to having a text input element and triggering an @input event whenever text is entered. const Child = { methods: {...
Read more >How to fix the React memory leak warning - DEV Community
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your...
Read more >(The only proper) PDO tutorial - Treating PHP Delusions
Note that this method is memory-friendly, as it doesn't load all the resulting rows in the memory but delivers them one by one...
Read more >@elastic/eui | Yarn - Package Manager
The Elastic UI Framework is a collection of React UI components for quickly building user interfaces at Elastic.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes.
More findings:
It DOES matter if there is an input element (that got focused!). When the previously focused input element gets removed and devtools was opened then a bug in chromium hinders GC to do its job fully. Eventually, GC will kick in, but definitely not immediately.
Conclusion: At some point, this will get fixed in the Chromium/Blink engine. But we really can’t do anything about it in Quasar. But it seems to not affect a production environment.