I have a UITableView that displays images associated with contacts in each row. In some cases these images are read on first display from the address book contact image, and
I do something like this, but iPad-only, and it seemed fast enough. NSOperationQueue
(or raw GCD) seems like the simplest approach, in that everything can be self-contained and you don't need to worry about synchronization. Also, you might be able to save the last operation, and use setQueuePriority:
to lower it. Then the most recent one will be pulled from the queue first. Or go through all -operations
in the queue and lower their priority. (You could probably do this after completing each one, I assume this would still be significantly faster than doing the work itself.)
I'm a big fan of NSOperationQueue
's interface and ease-of-use, but I also needed a LIFO version. I ended up implementing a LIFO version of NSOperationQueue
here that has held up quite well for me. It mimics NSOperationQueue
's interface, but executes things in a (roughly) LIFO order.