ImageLoader

  • advantages

    • Local cache file name rule definition is supported
    • Support download progress monitoring
    • Memory cache and disk cache
    • The default implementation of a variety of memory caching algorithms, such as the Size of the largest first delete, the least used first delete, the least recently used, first delete, the longest delete
    • The PauseOnScrollListener interface allows you to pause image loading while a View is scrolling
  • disadvantages

    • Configuration is cumbersome
    • Update stopped
    • HttpClient has been abandoned by Google. There are too many apis in HttpClient and it is difficult to expand

Fresco

  • advantages

    • Automatic memory reclamation, image is not visible, accounting automatically release the occupied memory, as far as possible to avoid OOM
    • Level 3 cache. Two levels of memory cache (decoded and undecoded) + one level of disk cache. Improves the loading progress and saves memory space
    • Memory cache includes bitmap cache and undecoded image cache, which can speed up image loading and save memory. File cache is similar to undecoded memory cache, which stores undecoded original images. In addition, Fresco automatically cleans up the two levels of memory cache when the app switches to the background to support a variety of loading scenarios. Such as GIF loading, Gaussian fuzzy loading, but also provides progressive loading, first load small image and then load large image
    • Support priority processing
    • Load progress monitoring
    • Support a variety of custom image loading procedures
    • A push can be displayed in the ImageView in any center store, not just the center of the image
    • Good support for GIF loading
    • Caching raw images
  • disadvantages

    • Fresco is heavy and big
    • Fresco is injectable and cumbersome to use
    • The SimpleDraweeView problem ImageView must be used to load the display image
    • Display images must specify the width and height of the image

Picasso

  • Advantages:

    • Picasso uses ARGB-8888 and loads a full picture, which is of high quality and clarity
    • Support priority processing. Each time a task is scheduled, the money will choose the higher priority task
    • Support delay until image sizing is finished loading
    • Automatically adjusts the maximum number of concurrent threads in the thread pool based on network changes
    • Two levels of cache, memory cache and disk cache, image loading order isLruCache — DisLruCache — NetWork
  • Disadvantages:

    • If the sampling rate is too high, the probability of OOM exception is higher than that of Glide
    • Cannot load Gif images
    • The cache sideload rate and loading speed are insufficient

Glide

  • advantages

    • Support priority processing
    • Support Gif image loading
    • The memory occupied by images can be reclaimed in a timely manner, reducing crashes caused by insufficient memory. The life cycle is the same as that of activities/fragments. The default Bitmap format is RGB_565, reducing the memory usage, caching not only images but also media
    • There are memory and disk caches
    • The ImageView control gets a bit of the corresponding size
  • disadvantages

    • When using, memory consumption is serious
    • Method Quantity: Fresco > Glide > ImageLoader
    • Glide ≈ Fresco > ImageLoader
    • Size: Fresco > Glide > Picasso
    • Memory consumption: Fresco > ImageLoader > Picasso > Glide