Simbul / baker

The HTML5 ebook framework to publish interactive books & magazines on iPad & iPhone using simply open web standards
http://bakerframework.com
1.53k stars 378 forks source link

Memory Warning #1068

Open tekdope opened 11 years ago

tekdope commented 11 years ago

Hi Guys,

i experience a lot of memory warning in the app, some of them drive to a crash. Specially on iPads 3 and 4 (retina display).

Html and images are fully optimized, I noticed it happen when i have very long pages. I run multiple tests by switching render modes (three-cards and screenshots) without noticing any real improvements. In 3 cards mode, the amount of data is in an average of 5 to 10 Mo which is not, to me, the end of the world. But app can be really unstable on iPad 3 and 4.

I know i can still split a page in multiple page to avoid this but i was wondering if there was kind of optimization or better memory management to improve on baker's side.

Also i would be interested others experience the same problem.

folletto commented 11 years ago

Unfortunately Baker does already everything's possible :/ And of course, if something's missing, please forward the patch to us with a pull request. :)

Did you try also things like delayed loading of images using javascript? That might help. http://stackoverflow.com/questions/2897598/delay-image-loading-with-jquery

Out of curiosity, how are you measuring memory consumption?

tekdope commented 11 years ago

Using the Xcode tools and an app called System Status. I'm feeling a bit stupid 'cause i didn't think at all of delayed images...

Thanks for the head up.

folletto commented 11 years ago

Ok. :)

Just for information, mind that the reading should be done with Instruments on the actual device, since the simulator is well, a simulator, and doesn't give exactly 1:1 numbers (different libraries, etc).

It might be what you're already doing, but just to be sure, this might help: http://www.raywenderlich.com/2696/how-to-debug-memory-leaks-with-xcode-and-instruments-tutorial

tekdope commented 11 years ago

Yep exactly what i'm doing and on difference iPad (2-3-4 and mini). Memory problem is only on retina devices. I'll keep you posted on result of delayed images and if i find something else that could help others. :)

benoitchantre commented 11 years ago

@tekdope have you some results to share? Did you solve this issue on retina devices?