Ffimageloading: Expected to always show loading screen?

Created on 4 Dec 2017  路  3Comments  路  Source: luberda-molinet/FFImageLoading

Hi all,
I'm a bit surprised about the default behaviour of FFImageLoading within my Xamarin Forms app so I downloaded your sample and it's the same there in FFimageLoading.Forms.Sample.Droid:

  1. After application start I selected "List example".
  2. The list shows the "LOADING" screen and after short time the images. So that's fine.
  3. Now I close the application completely (using the android square icon)
  4. I start application and click "List example" again.
  5. Now the listview again shows the "LOADING" images before displaying the correct images.

I'm surprised why it still shows the "LOADING" images first (in step 5). It's displayed for a shorter time than in step 2 so I guess it's cached fine, nevertheless it still shows "LOADING". Shouldn't it automatically display the correct images when they are cached?

I'm not sure whether I made something wrong (even though I used the supplied sample project), or whether that is the expected behaviour? If so, is there any way to avoid displaying the "LOADING" image if the correct image is already cached so that "LOADING" is only shown on first start?

See also screencast.

Many thanks!

question

Most helpful comment

There are two kinds of image loading involved here:

  • Disk cache (image download + storing image on the disk)
  • Then the file is read from disk cache and image file is decoded to a memory cache. It also takes some time. Decoding eg. jpeg file to native bitmap is also a resource heavy operation.

When the file is already downloaded, only the second step occurs. That's all.

Image doesn't support placeholders, so instead "loading" you simply get a blank image. You don't see images immediately too, it's just loading placeholder that gives you different perception.

All 3 comments

I always though that this is loading time between cachedimage to xaml. Am I wrong? you expect instant display?

Maybe this is the loading time, but I'm not sure about it. When I use the default image control there is no loading time (as far as I've seen) so I just want to be sure whether that's the normal behaviour or whether it could be fixed to display the images immediately.

There are two kinds of image loading involved here:

  • Disk cache (image download + storing image on the disk)
  • Then the file is read from disk cache and image file is decoded to a memory cache. It also takes some time. Decoding eg. jpeg file to native bitmap is also a resource heavy operation.

When the file is already downloaded, only the second step occurs. That's all.

Image doesn't support placeholders, so instead "loading" you simply get a blank image. You don't see images immediately too, it's just loading placeholder that gives you different perception.

Was this page helpful?
0 / 5 - 0 ratings