If the user has a class 6 SD-card, the sd-card is faster than the on-
board phone-storage in many cases. In my app, i'm using memory (RAM)
as the main cache (fastest) and the SD-card as a backup cache
(slower). Network loading is usually much slower than either of them.

But if you always have the same 25 60x60 images, then you could cache
them into one large image: a 300x300 image, consisting of 25 (5x5)
tiles of 60x60, on your SD-card. When you start the app, read this
large image, divy up this large image into 25 small bitmaps again and
put these into a ArrayList or some other collection.


On Aug 10, 4:28 pm, Davide <[email protected]> wrote:
> 2010/8/10 Streets Of Boston <[email protected]>:
>
> > The raw binary data of your image (e.g. RGB_565 or ARGB_8888) is not
> > part of the java heap. The dalvik-vm does not 'see' this heap. But the
> > raw binary is counted towards the total heap allowed for your app's
> > linux-process. That's where you see the discrepancy.
>
> > And yes, i would cache your images on your file-system.
>
> Many thanks for the response. You explaination is the same as:
>
> http://stackoverflow.com/questions/2131947/android-memory-allocation
>
> So i will try to download the bytes of the image and save they on the
> external memory. Then when necessary I convert it on the fly in bitmap
> and set on the image view!
>
> But was is strange is that I have copied the code from internet.
> My starting problem was to lazy loading images in a listview.
> Examples in internet use ArrayList of Bitmaps!
>
> Where can I write the downloaded images to be quickly readed after?
> I think sd card i slow ... or?
>
> --
>   _|  _.    o  _|  _
>  (_| (_| \/ | (_| (/_

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to