Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lng

macrumors newbie
Original poster
Jul 19, 2010
8
0
Hi all, i have SQLite table where my records stays as:

Code:
Antenna
Apple
April
Buffalo
Ship
Pill
..

To be able to display them on sectioned UITableViewController, i query the first letters from these records and create an array with them. Then for each letter in the array, i again query table and get each records starting with that letter. I guess you got the idea.

Since i do these operations in the app, it takes quite time (3-4 seconds) and app pauses in those seconds. I was curious if i can create those arrays and store somehow in the system. I can re-create them when i update the data time to time.

Thanks a lot in advance..
 
You can of course save them, either in your database or as plist files.

You should think about how you can make your database more efficient. For instance if you have a section column or firstLetter column in your database table with an index on the column then this step would be faster.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.