All Projects → kean → ImageFrameworksBenchmark

kean / ImageFrameworksBenchmark

Licence: MIT license
No description, website, or topics provided.

Programming Languages

swift
15916 projects

Image Frameworks Benchmark

Updated on May 23, 2021

Only comparing Swift frameworks and SDWebImage as an exception because it's still actively maintained and often used even today.

Main Thread Performance

Image loading frameworks are often used in table and collection views with a large number of cells. They must perform well to achieve smooth scrolling. This benchmark tests method that are used on the main thread.

Nuke.loadImage(with: url, into: view)
view.kf.setImage(with: url)
view.sd_setImage(with: url)
view.af.setImage(withURL: url)

The results (higher is better):

  • The reason AlamofireImage is so slow is that it's creating URLRequest instances and attaching HTTP headers on the main thread, which is expensive and not needed for memory cache lookup
  • Kingfisher performs disk reads on the main thread
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].