-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frames loading #105
Comments
I guess this is Did you use the latest version in SDWebImage (current SDWebImage 5.19.0) ? I remember that SDWebImage recently 5.18.5 fix a issue in SDWebImage/SDWebImage#3636 |
Only iPhone 7 (like a real old device) contains this issue ? What about other devices ? Is this because of the decoding speed can not even get 1 frame in reasonable time ? |
And, actually always remember, SDWebImage is open-sourced. You can set a breakpoint at |
I used 5.18.10, same behavior on 5.19.0.
I checked on XR, it was better, but still with frames freezing.
Looks like so 😓 Also, I saw a disk activity while freezing, I thought freezing may be connected with cache, but setting |
I guess the problem could be connected with amount of decoding webp-s. I don't look to decoding strategy, but looks like we try to decode all webp-s simultaneously, so, we get freezing on decoding on all of them. I checked kingfisher realization, they decode webp-s one by one and show images only after full decoding (but they have artifacts on images on iPhone 7 and XR). |
So, @dreampiggy is it possible to add some flag to show animated webp image only after all frames decoding? |
As I assumed, frames actually comes with significant delay on iPhone 7 and not such significant but visible on XR |
If you use mutliple
currently this will cause multiple player been created for each image view (because image player is retained by image view, not image object), and decode each of them I have indeed a idea to break this old behavior. Like:
|
Can you try using the decode options |
As I mentioned before, no efffect on frames loading :///
|
This So, actually, it does not need any decoding during the rendering. If the completion block is called for you, then all frames will be in the RAM and ready to use. When the timer fired (for animated image's next frame), it will directly render the current frame (that My guessIs this the timer (means, a class named
|
Or...Can you provide a reproducible demo...Since it's hard to guess what actual happends (on iPhone XR it works but suck at iPhone 7, sounds really surprise, because we don't use some magic hardware detection code like Video Decoding or Metal GL shader). If you can read simple objc code, you can try to debug with that and provide some more useful information. |
And, please fill the template (actually in SDWebImage Core repo)
-- Maybe possible a regression for lower iOS firmware for You can try to cherry-pick to a really old version (2-3 years ago like 5.9.0) to see what's happends. |
Hello, I'm trying to use animated webp images as cells for collection view and it works nice on new devices, but on devices like iPhone 7 I have such an issue: on first appearing of cell the loading of images is freezed, and scrolling is not (I can scroll the collection without freezes, so it is not main thread lock). There are approximately 50 cells of images, and they loads by frame. After some time (I guess when all frames of images are passed) all cells begin to animate correctly (after closing and reopening the screen too). Looks like it is something connected with caching. All webp-s are local files, so it is not network loading. Am doing something wrong? Here is the code:
The text was updated successfully, but these errors were encountered: