Load file optimization in FFImageLoading

LarsNymandLarsNymand DKMember ✭✭

Hi,

I have some challenges in getting FFImageLoading to load an image faster from the phones internal storage (Xamarin.Forms).

From when a user chooses the image to use it takes ~15 seconds before it's displayed and Success is called.

I tried to disable fade animation, setting LoadingDelay to 0 and giving it the highest priority, but nothing helps.

When looking at the output log it seems like the Garbage Collector (GC) starts to run a lot of times while the image is loaded.

If loaded to a "normal" Image view instead of CachedImage it only takes 1 sec?

Image size: 4k X 3k
CImage = new FFImageLoading.Forms.CachedImage
{
Aspect = Aspect.AspectFit,
CacheType = FFImageLoading.Cache.CacheType.None,
FadeAnimationEnabled = false,
LoadingDelay = 0,
LoadingPriority = FFImageLoading.Work.LoadingPriority.Highest
};
CImage.Success += (sender, e) => { //15 secs before this code is called });
file = await CrossMedia.Current.PickPhotoAsync();
CImage.Source = ImageSource.FromFile(file.Path);

I hope some of you can point me in the right direction.

Thank you in advance

Answers

  • Manisha97Manisha97 Member ✭✭

    What will happen here will image load after 15 sec?

  • LarsNymandLarsNymand DKMember ✭✭

    Hi Manisha97,

    thank you for replying, but this is an old subject, so I am not sure if this is still the case :-)

Sign In or Register to comment.