damus icon indicating copy to clipboard operation
damus copied to clipboard

Proposal to replace image manager library - Kingfisher to SDWebImage

Open OlegAba opened this issue 2 years ago • 1 comments

This branch requires more work until it is ready to be merged. I would like to know if we want to continue with the replacement before I proceed.

SDWebImage Pros

  • A decoder for WEBP (and HEIF, BPG, FLIF, AVIF, PDF, and Lottie if needed)
  • GIF downsampler
  • Better performance

SDWebImage Cons

  • More boilerplate to setup (will try to improve on this)
  • Less customization (haven't figured out how to set a max size for when downsampling needs to happen)
  • Written in Obj-C (might be harder to debug logs)

WebP Decoder

Kingfisher SDWebImage
webp-kf webp-sd

GIF Downsampler

Kingfisher SDWebImage
gif-kf-downsample gif-sd-downsample

Test - Downloading images while scrolling fast

Kingfisher SDWebImage
KF-Fast-DL SD-Fast-DL

Test - Downloading images while scrolling slow

Kingfisher SDWebImage
KF-Slow-DL SD-Slow-DL

Test - Loading cached images

Kingfisher SDWebImage
KF-Loading SD-Loading

OlegAba avatar Feb 21 '23 04:02 OlegAba

very cool. will test

jb55 avatar Feb 27 '23 18:02 jb55