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
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
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:
karimfikry
changed the title
Memory
Change views frequently lead to too much memory consumed
Jan 4, 2015
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.
with FF, I notice a slight increase in memory (maybe 10 MB for every 10 switches), but that is reduced to almost baseline after a certain amount of time (even when continuing to switch)
Chrome does not cause any rise in memory consumption.
Can you reproduce the problem with this plnkr? Otherwise it might be content / a directive inside the view that is not cleaned up properly.
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).
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: