Working on first app, have most of the programming done but app is taking too long at launch to display first tableview on tabbar. It takes 8-10 seconds on launch to display. Looking for help on tracking down what code is taking so long, etc. Here is the general app setup: tabbar with 5 tabs including navigation bars, mix of tableviews with detail views and scrollviews. The data for the tableviews is from multiple json feed from a remote web server. In the appdelegate.m I'm setting up the full tab/navigation bars. I get the json data feeds in each individual view controllers that setup on the tabbar. I've used the Profiler but don't know what I'm looking for and where. What is loaded on launch? Any advice on general setup of app that could be causing the delay? Does it load all views associated on the tabbar? Thanks in advance for any help.
Asked
Active
Viewed 1,288 times
0
-
If calling json on an external site then that would be the first guess networks take time - what happens if you use data from the app – mmmmmm Jul 15 '12 at 22:13
-
Mark, I have 7 json feeds all defined and loaded in each view controller. I didn't try using data in the app but reduced the json feeds to only grabbing 1 record and it didn't help. Is it just overhead with the network, etc? I could pair down the app to only 1 json and 1 view controller and see? I'm just grabbing the json and outputting the images using dispatch_async. My app is NOT setup like the LazyTableImages app by Apple where it grabs xml in delegate, loads into separate class object, and has a separate Parser and IconDownloader class to process. I would need a set for each json feed? – rossi Jul 16 '12 at 14:31
-
How do I split this off and run Dispatch in background outside of building table cells? – rossi Jul 17 '12 at 00:11
1 Answers
2
Run your program through instruments. Always. All the time. It will tell you most of the problems.
That said, you probably need to delegate your startup tasks to background threads, and update the UI as data comes available.
Use NSOperation, GCD, and related technologies for executing your background tasks.

Jody Hagins
- 27,943
- 6
- 58
- 87
-
-
https://www.google.com/#q=nsoperationqueue+example https://www.google.com/#q=grand+central+dispatch+example – Jody Hagins Mar 11 '15 at 12:57