Performance advice required - creating images for a scrolling list view on Android
This is a question about how best to manage thumbnail images in an list view style app written in Actionscript 3 for Android.
I am building an app that uses a list view control to show lists of data. As each list item appears on screen during a scroll through the list I create a thumbnail image to display in the list item cell.
Currently I am embedding the jpg thumbnails in actionscript and using mx.core.bitmapasset to get bitmaps on the fly. On a live device this is unfortunately slowing things down - the smooth scrolling list jerks every time a new cell appears on screen.
There are probably going to be 500+ thumbnails but a list will only ever have about 150 items in it at any one time, of which only about 6 or 7 are onscreen at the same time. The list view control is one that I have created myself in actionscript but I am pretty sure the thumbnail creation is the cause of the slowdown. If I take out thumbnails the scrolling is smooth. If I reuse the same thumbnail across all cells then scrolling is smooth too. The component reuses cells as they disappear off one end of the list so there isn't much creation of objects going on.
I am running this in debug so it might be possible that in release things are better (maybe?).
Does anyone have any advice on how best to approach this problem of getting jpg assets available quickly?