actionscript 3 - Bitmaps Being Cached As Bitmaps -


i have slideshow type portion of air mobile ios working on. there 4 pages user can scroll through. each page contains png (as large 1mb, after compression) loaded in using bitmap class , 2 textfields. scrolling through them (using custom scroll framework works without issues throughout app), app caching each of png images bitmap come onto screen , unloading them when leave screen after period (most next gc, though seems less random gc).

the act of caching pngs incredibly slow on ios, when happening while action (such scrolling) happening. produces ~1 sec delay while scrolling, unacceptable. there way either a) prevent caching or b) keep them cached longer/indefinitely until images eligible gc?

i've triple checked code , nothing set cacheasbitmap. additionally, i've been using adobe scout pinpoint causing momentary freeze , caching images. i've eliminated transforms or scales or filters or might turn cacheasbitmap on in order operate , results remain same.

it turns out bitmap caching wasn't problem afterall. after more examination, found png decompression. basically, flash decompressing pngs coming on screen (which more expensive caching), adding memory, , undoing process after had been off screen period of time, meaning have decompress on again after period of time each image.

to around this, need access bitmapdata object in way. used getpixel( 0, 0 ) in constructors , images decompressed , loaded bitmapdata permanently upon doing so. add bit of time startup, preloading in fashion results in better performance.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -