lorenzofiamingo / swiftui-cached-async-image

CachedAsyncImage is the simplest way to add cache to your AsyncImage.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Loading from cache slowing down animations

f3dm76 opened this issue · comments

Hello @lorenzofiamingo, thank you for this great library! However when the image is really big, it seems like loading from cache slows down main UI thread. Could this operation be moved to background thread by any chance? When initially loading from server, navigation happens immediately and shows loading indicator, which looks good. But when it is already in cache, this is how the animation looks like. In any case have a beautiful day!
https://user-images.githubusercontent.com/9447630/177713459-6e510665-a336-4b95-a173-f6a76a0445be.mp4

Hi @f3dm76! Designing the behavior of CachedAsyncImage I decided, for a cached Image, to load it as a normal Image would do with an image placed in local assets. If you put this big image in your assets and replace CachedAsyncImage with Image, does it work smoothly?

p.s. The linked video doesn't play.