FlyImage
FlyImage takes the advantages of SDWebImage, FastImageCache and AFNetworking, is a simple and high performance image library.
Features:
- High Performance, reduce memory operations while rendering, avoid
Memory warning
caused by image - Store and retrieve different size of small images in one memory file, smooth scrolling
- Simple, support
UIImageView
,CALayer
category - An asynchronous image downloader
- Support
WebP
format - Support
mmap
to improve I/O performace
Installation with CocoaPods
Set the Podfile like this:
platform :ios, '8.0'
pod 'FlyImage', '~>1.0'
If you are using Swift, be sure to add use_frameworks!
:
platform :ios, '8.0'
use_frameworks!
pod 'FlyImage', '~>1.0'
If you want to support WebP
, just change the Podfile:
platform :ios, '8.0'
pod 'FlyImage/WebP', '~>1.0'
How To Use
Using UIImageView and CALayer Category
Using FlyImageCache
Using FlyImageIconCache
More demos in folder Examples
Performance Mesure
Memory when scrolling images
Demo Target: FlyImageView / Device: iPhone6 Plus
Memory | FlyImage | SDWebImage | UIKit |
---|---|---|---|
All Heap Allocations | 2~7M | 2~4M | 2~5M |
All Anonymous VM | 17~30M | 310M | 17~30M |
FPS when more than 170 small images in the same screen
Demo Target: FlyImageIconView / Device: iPhone6 Plus
FlyImage | SDWebImage | UIKit |
---|---|---|
58~60FPS | 6~7FPS | 6~7FPS |