Need advice on speeding up tableViewCell photo loading performance

Posted by ambertch on Stack Overflow See other posts from Stack Overflow or by ambertch
Published on 2010-04-29T06:24:49Z Indexed on 2010/04/29 6:27 UTC
Read the original article Hit count: 504

I have around 20 tableview cells that each contain a number (2-5) thumbnail sized pictures (they are VERY small Facebook profile pictures, ex. http://profile.ak.fbcdn.net/hprofile-ak-sf2p/hs254.snc3/23133_201668_2989_q.jpg). Each picture is an UIImageView added to the cell's contentview.

Scrolling performance is poor, and measuring the draw time I've found the UIImage rendering is the bottleneck.

I've researched/thought of some solutions but as I am new to iphone development I am not sure which strategy to pursue:

  • preload all the images and retrieve them from disk instead of URL when drawing cells (I'm not sure if cell drawing will still be slow, so I want to hold off on the time investment here)
  • Have the cells display a placeholder image from disk, while the picture is asynchronously loaded (this seems to be the best solution, but I'm currently not sure exactly how to do best do this)
  • There's the fast drawing recommendation from Tweetie, but I don't know that will have much affect if it turns out my overhead is in network loading (http://blog.atebits.com/2008/12/fast-scrolling-in-tweetie-with-uitableview/)

Thoughts/implementation advice? Thanks!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uitableview