FastImageCache – iOS library for quickly displaying images while scrolling
1–10 of 35 posts
Re: FastImageCache – iOS library for quickly displaying images while scrolling
#2Re: FastImageCache – iOS library for quickly displaying images while scrolling
#3It does seem weird that they store the uncompressed image on the disk. I think that a benchmark on this comparing with compressed / decompress on CPU would be interesting because one is bounded on I/O, another is bounded by CPU throughput.
This technique is used on the iOS home screen - both the icon images and the rendered icon labels are stored as uncompressed bitmaps on disk and mmap'd when needed into memory. The fast loading allows SpringBoard to aggressively recycle icon views.
Re: FastImageCache – iOS library for quickly displaying images while scrolling
#4It does seem weird that they store the uncompressed image on the disk. I think that a benchmark on this comparing with compressed / decompress on CPU would be interesting because one is bounded on I/O, another is bounded by CPU throughput.
Re: FastImageCache – iOS library for quickly displaying images while scrolling
#5It does seem weird that they store the uncompressed image on the disk. I think that a benchmark on this comparing with compressed / decompress on CPU would be interesting because one is bounded on I/O, another is bounded by CPU throughput.
One thing that is often overlooked when considering file I/O is that the kernel caches previously accessed files for fast reads. This, combined with the lazy-loading mmap() can prove for good performance with simultaneous low memory usage for something like an image cache. This technique is used on the iOS home screen - both the icon images and the rendered icon labels are stored as uncompressed bitmaps on disk and m…
Re: FastImageCache – iOS library for quickly displaying images while scrolling
#6It does seem weird that they store the uncompressed image on the disk. I think that a benchmark on this comparing with compressed / decompress on CPU would be interesting because one is bounded on I/O, another is bounded by CPU throughput.
We didn't go the route of caching the uncompressed data on disk, though, we just keep the images in a maintained in-memory cache.
Re: FastImageCache – iOS library for quickly displaying images while scrolling
#7Re: FastImageCache – iOS library for quickly displaying images while scrolling
#8Re: FastImageCache – iOS library for quickly displaying images while scrolling
#9It does seem weird that they store the uncompressed image on the disk. I think that a benchmark on this comparing with compressed / decompress on CPU would be interesting because one is bounded on I/O, another is bounded by CPU throughput.
It actually isn't all that surprising, we've hit similar bottlenecks where JPEG decompression on the iPhone ends up choking feeds that are scrolled through quickly. We didn't go the route of caching the uncompressed data on disk, though, we just keep the images in a maintained in-memory cache.
Re: FastImageCache – iOS library for quickly displaying images while scrolling
#10Earlier quoted context omitted.
One thing that is often overlooked when considering file I/O is that the kernel caches previously accessed files for fast reads. This, combined with the lazy-loading mmap() can prove for good performance with simultaneous low memory usage for something like an image cache. This technique is used on the iOS home screen - both the icon images and the rendered icon labels are stored as uncompressed bitmaps on disk and m…
Does mmapping the file mean that it'll block on file I/O if it's not already cached, though? I don't see any claims (haven't read the code) that it prevents this.