ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Slidebox ran out of memory since it loads everything in one go

Open sunshineo opened this issue 11 years ago • 6 comments

I was trying to load 500 images into slide box. I got this when running on real device 2014-12-24 05:29:07.861 myApp[11296:4389346] Received memory warning. After that, it just crashes.

I tried to use collection-repeat but it seems does not work with slidebox What can I do?

sunshineo avatar Dec 24 '14 13:12 sunshineo

Hey @sunshineo - can you provide a codepen to demonstrate exactly how you're using the slidebox?

drewrygh avatar Dec 24 '14 21:12 drewrygh

I will. But I'm on vacation now. I'll provide in Jan, pls do not close this

sunshineo avatar Dec 26 '14 09:12 sunshineo

I also have a slide box that when filled with lots of slides (containing soccer match results for a lot of matches) crashes/hangs. When I don't have that many slides everything works great, but some professional soccer teams have lots of matches and when I click such a team, the number of slides go up, and the app hangs...

No need for a codepen, because it is simply a ion-slide-box with lots of slides...

mobilabgit avatar Dec 30 '14 21:12 mobilabgit

This is a limitation of the current slidebox, and we've been building an improved one that could handle this. That said, you're loading hundreds of images into one page on devices with little memory, that's simply the problem. I'd recommend a refactor until we release the improved slidebox.

adamdbradley avatar Dec 31 '14 15:12 adamdbradley

@adamdbradley Could you be a little more specific about "refactor"? What do you mean by that?

sunshineo avatar Dec 31 '14 22:12 sunshineo

adding ng-if to slidebox's children helps http://forum.ionicframework.com/t/ios-recieved-memory-warning-then-terminated-due-to-memory-pressure/3399/5

jyxt avatar Feb 16 '15 10:02 jyxt