iPhone: Algorithm for fetching required data and images from server only once

156 views Asked by At

I have implemented an iPhone App that has FanWall in it where users are allowed to put their comments on FanWall screen and other users can comment on their comment or add new comments. It works fine but very slow as every time FanWall screen loads I get the top 25 comments(I have a load more button to load next 25 comments..) including images, comments and other properties from Server as a Zip file. iPhone App then parses this zip file's plist file to arrange comments and images in Fanwall screen. I do this every time as I need to download any new comments and comments on comment or any changes that have been made to existing plist file! Hope I am clear here! Could anyone please throw their thoughts on optimal fetching strategy please. Thanks.

1

There are 1 answers

0
coffee_machine On BEST ANSWER

A way to make it faster is to tell the server exactly what you need to download.

Example: please send me the comments added between 2012-01-01 and 2012-01-03.

Pull the rest from a local cache.