问题
I am developing my first iOS app and I am almost ready to submit to app store. However, I am having problems with launch time. It is taking ~3 seconds to launch. The app has a ContainerView
with three UIViewControllers
as Child View Controllers. The middle UIViewController
is a camera and the left and right UIViewControllers
are mostly made up of UITableViews
that make basic network queries (not on main thread) to populate them. Basically, I am trying to figure out why my app takes 3 seconds whereas apps like SnapChat and Instagram take <1 second.
I tried seeing what was taking so long using Time Profiler in Instruments. There were a couple easy fixes but now I am stuck. It says 357ms are from main
but when I double click on it, it just takes me to AppDelegate and shows me that AppDelegate is accounting for 100% (of the 357ms? - correct me if this is wrong). But this isn't helpful because I know that main()
is to launch the app (?) but it isn't telling me anymore. Whereas when I click on other methods listed it breaks it down for me (i.e. what each part of the code is accounting for). This is my first time using Time Profiler and any help would be greatly appreciated.
来源:https://stackoverflow.com/questions/32318610/slow-launch-time-how-to-navigate-time-profiler