Skip to content
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

Memory leak when switching between views #5743

Closed
christoph-thommen opened this issue Mar 7, 2016 · 14 comments
Closed

Memory leak when switching between views #5743

christoph-thommen opened this issue Mar 7, 2016 · 14 comments

Comments

@christoph-thommen
Copy link

When Switching between Tabs / Views, the used memory is increased by 0.3-0.7 MB each switch.
This happens also, when the app content (ion-content) is completely blank and all functionalities within controller.js/app.js are commented out.

Ionic Version: 1.2.4
Cordova version: [email protected]

Browser & Operating System: iOS

Run ionic info from terminal/cmd prompt:

ionic info

Your system information:

Cordova CLI: 6.0.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Version: 1.2.4
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: Not installed
ios-sim version: 5.0.6 
OS: Mac OS X El Capitan
Node Version: v0.12.7
Xcode version: Xcode 7.2.1 Build version 7C1002 
@jgw96
Copy link
Contributor

jgw96 commented Mar 22, 2016

Hello! Thanks for opening an issue with us, we just need a little more info from you so that we can better help you with your issue. Would you mind posting a code sample, plunkr or codepen that we can use to reproduce your issue? Also, would you mind running ionic info and posting the output? Thanks again!

@christoph-thommen
Copy link
Author

Hi
ionic info output is already in my previous post.
As an example you can just take an empty ionic app with tab navigation... When switching around through the views, the memory just increases

Thanks

@jgw96
Copy link
Contributor

jgw96 commented Mar 22, 2016

@Pyroon, will have to do some testing of my own, Thanks! Are you using chrome dev tools to inspect memory usage?

@christoph-thommen
Copy link
Author

Yes, but you can see it best when running the app on the iOS simulator (e.g. ipad simulator) and inspecting the memory usage with xcode.

@jgw96
Copy link
Contributor

jgw96 commented Apr 7, 2016

@Pyroon Are you using any external libraries?

@jgw96 jgw96 added the needs: reply the issue needs a response from the user label Apr 7, 2016
@christoph-thommen
Copy link
Author

christoph-thommen commented Apr 8, 2016

I use some plugins like those:

"com.telerik.plugins.wkwebview": { "WKWEBVIEW_SERVER_PORT": "12344", "PACKAGE_NAME": "xxx" }, "cordova-plugin-console": { "PACKAGE_NAME": "xxx" }, "cordova-plugin-device": { "PACKAGE_NAME": "xxx" }, "cordova-plugin-network-information": { "PACKAGE_NAME": "xxx" }, "cordova-plugin-webserver": { "PACKAGE_NAME": "xxx" }, "ionic-plugin-keyboard": { "PACKAGE_NAME": "xxx" }

additionally, I'm using ng-websocket

@Ionitron Ionitron removed the needs: reply the issue needs a response from the user label Apr 12, 2016
@danbucholtz
Copy link
Contributor

Hi @Pyroon,

Can you provide a codepen to recreate this? Let's try to limit external dependencies so we can determine if this is an Ionic issue or a cordova issue.

Thanks,
Dan

@danbucholtz danbucholtz added the needs: reply the issue needs a response from the user label Apr 15, 2016
@christoph-thommen
Copy link
Author

Hi
I think I found the issue. It's related to ng-repeat (angular/angular.js#11169)
Cheers

@Ionitron Ionitron removed the needs: reply the issue needs a response from the user label Apr 20, 2016
@jgw96
Copy link
Contributor

jgw96 commented Apr 20, 2016

@Pyroon so are you not having the memory leak anymore? Also if you can, could your provide a plunkr or codepen that demonstrates this issue? Thanks!

@christoph-thommen
Copy link
Author

Hi
we still have memory issues, but it looks like it's related to the angular ng-repeat memory problem. So no need to go more in detail for ionic. I think switching to ionic 2 asap would help to resolve this issue as the bug is fixed in angular 2
Cheers

@jgw96
Copy link
Contributor

jgw96 commented Apr 20, 2016

@Pyroon sounds good then! Thanks for using ionic!

@jgw96 jgw96 closed this as completed Apr 20, 2016
@dig1234
Copy link

dig1234 commented Sep 28, 2016

@jgw96 @Pyroon is this problem resolved ? it still exists on [email protected]

@cozzbie
Copy link

cozzbie commented Feb 10, 2017

Seems to be an angular and not ionic issue @dig1234

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 4, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants