News for hackers. Stuff that matters.
Re:FastImageCache – iOS library for quickly displaying image... by skyebook on Monday October 21, 2013 @09:46PM (#6589332)
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 image... by liuliu on Monday October 21, 2013 @10:07PM (#6589397)
Exactly. I would think that a layered cache scheme probably could have the best of the two worlds (a good size of cached content on disk, and fast uncompressed image hit from memory). But using mmap'ed file instead of doing own layered cache seems less hassle. Also, you are doing decompression on a background thread, which shouldn't be much a choke on 4S and later devices (probably, again). I need to have some tests to backup my claims obviously :)
Re:FastImageCache – iOS library for quickly displaying image... by skyebook on Monday October 21, 2013 @10:51PM (#6589526)
If you're using libdispatch on the 4S you might consider using a serial queue (for NSOperationQueue just set the maxConcurrentOperationCount to 1) as it starts to eat the CPU pretty quickly if you're trying to load a lot of images.

Even on the 5 I was surprised by how much it helped to have the images cached (no anecdotal data on the 5S as it came out way after we started caching)

Re:FastImageCache – iOS library for quickly displaying image... by nielsbot on Tuesday October 22, 2013 @02:12AM (#6590060)
that can work depending on how many images you have... Note also that there's a decompression hit loading PNG too.