You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow the steps on the website to create a new project and get it up and running, then click Home and About on the page to switch routes
What is expected?
When switching routes, the component memory of the old route should be released
What is actually happening?
Part of the memory is not being freed, the memory keeps increasing
System Info
macOS 10.15.7
Google Chrome 120.0.6099.109
Any additional comments?
The project developed by my company with vue3 is encountering performance problems, because there will be a lot of page data, and after opening the same route several times, the performance will obviously decline and become stuck. I thought it was the cause of keepalive, but after I removed keepalive, the problem still exists, and I also upgraded the related dependency to the latest version. But they didn't solve this problem, so I decided to verify it with the vue initialized project, and found that the newly initialized project also existed this phenomenon, memory increment, not completely released
The text was updated successfully, but these errors were encountered:
I don't think this is related to static hoisting. This is actually caused by the devtools _buffer if you look at the retainers of the detached HTML elements, and it won't happen in production (or if you disable the devtools).
Even with the devtools _buffer, it is cleared after a short time and you won't see detached elements anymore. So I don't think the case you are seeing here in the basic hello world app is the same as the leak you are experiencing in your actual app. It may still be caused by KeepAlive. I'd recommend compare the memory snapshot and look at the retainers to make sure, and open a new issue with a new reproduction that is closer to your actual app.
In fact, you can try to package the basic hello world app, use nginx to access the index.html file in the dist generated by the package, and do what I said above, you will find that the svg ICONS are not released after separation, because I use the element-plus ui library, This library uses a lot of svg ICONS, and I'm not sure if it's because the svg elements are not being freed that it's causing the subsequent memory leak issues
Vue version
3.3.13
Link to minimal reproduction
https://cn.vuejs.org/guide/quick-start.html
Steps to reproduce
Follow the steps on the website to create a new project and get it up and running, then click Home and About on the page to switch routes
![image](https://private-user-images.githubusercontent.com/40896216/292950940-b2e4f3ee-7996-4f55-a1a1-0bf09d64a863.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MzY1MjMsIm5iZiI6MTczOT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wMDY4NGQ5N2U0NzNkYTc1MjhiMTk5NTY0YTRhZGUwYmNmNjM5MzY2NmQwNDE2NzQxZTg1ZDM0MDE1NTViY2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.EzVJ2IEpUz0zU8mG1bOPVuv652WMWjsn1GXwoDKlqdM)
![image](https://private-user-images.githubusercontent.com/40896216/292951872-bf9662ca-6c8f-4f9d-b06f-c46a0d10b5eb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MzY1MjMsIm5iZiI6MTczOTYzNjIyMywicGF0aCI6Ii80MDg5NjIxNi8yOTI5NTE4NzItYmY5NjYyY2EtNmM4Zi00ZjlkLWIwNmYtYzQ2YTBkMTBiNWViLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE2MTcwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVmNzAxYmJjYWM1YTQ2YTU2NzAxN2M4ZjYwZjY3YjU5ZmY3MGE0NTg0MTFmNjMyZjJjOWUzMGNmNjU4MDQ0ZDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.i-aCBnMT2n-quuFew8rXnUOQEW_OZDn696KZkvod8YU)
What is expected?
When switching routes, the component memory of the old route should be released
What is actually happening?
Part of the memory is not being freed, the memory keeps increasing
System Info
Any additional comments?
The project developed by my company with vue3 is encountering performance problems, because there will be a lot of page data, and after opening the same route several times, the performance will obviously decline and become stuck. I thought it was the cause of keepalive, but after I removed keepalive, the problem still exists, and I also upgraded the related dependency to the latest version. But they didn't solve this problem, so I decided to verify it with the vue initialized project, and found that the newly initialized project also existed this phenomenon, memory increment, not completely released
The text was updated successfully, but these errors were encountered: