-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Change views frequently lead to too much memory consumed #10638
Comments
would it be possible for you to create a plunker that shows this? |
I created a small plunker which of course don't match the original case (As I have private data in it), but at least will show you the problem I'm pointing to. To regenerate the issue, please click on the bottom button (switch view) frequently and track the memory in Task Manager, you will find it increasing rapidly Also, kindly find my question on stackoverflow regarding this issue |
I have downloaded the plnkr and opened the test page as the only tab in FF and Chrome, and then switched views every other second, and checked the memory consumption in Windows Task Manager.
Can you reproduce the problem with this plnkr? Otherwise it might be content / a directive inside the view that is not cleaned up properly. |
I did the same test and was not able to see any increase in memory usage. |
So, the question is how to clean directives properly? As I really have a directive used in ng-repeat and frequently I remove the first element in the array (which isn't not existing in DOM, but still reserve memory). The directive I'm using is wavesurfer-angular. I'll update my plunker sooner and re-post it |
I'm gonna close this, but feel free to reopen this issue when you have updated the plnkr. |
Using ng-view and switch its content frequently consume too much memory in Chrome, Firefox, Safari as I noticed it goes larger and never clear the memory of the previous used view.
For example: when I launch the application for the first time let's say It consume ~100 MB of RAM, then I change the view 10 times, then It almost reach ~800 MB. So It appends the memory and don't destroy the old view's content.
I checked #3543 and It seems to be fixed by 1.3.0-beta.20, but after testing my application it seems that it's not resolved yet.
The text was updated successfully, but these errors were encountered: