Re: iOS app launching speed
Re: iOS app launching speed
- Subject: Re: iOS app launching speed
- From: Conrad Shultz <email@hidden>
- Date: Tue, 15 May 2012 15:10:54 -0700
On 5/15/12 2:35 PM, Alex Zavatone wrote:
>
> On May 15, 2012, at 02:13 PM, Kyle Sluder <email@hidden> wrote:
>
>>
>> On May 15, 2012, at 1:57 PM, Alex Zavatone wrote:
>>
>> >
>> > But that's the point, I'm never going to display an empty TVC.
>>
>> Yes you are, because best practice says you're going to let your app
>> finish launching while you load your data in the background. Or else
>> prepare for people to uninstall your app because it crashes so often
>> during launch, since the network stalled while the data was loading.
>
> Corporate intranet, Enterprise app. Not a factor.
>
As someone who, in addition to writing apps, has actually engineered and
administered corporate networks I can assure you that this is still a
factor.
No matter the company, or how good the engineers are, there WILL be a
point where someone accidentally creates a routing loop, or a switch
goes down and there is no hot replacement, or there is an unrecognized
dependency on some upstream service. Heck, I've seen a malfunctioning
elevator motor cause catastrophic wireless interference.
I don't know how much clearer we can be on this: so far, it looks like
Kyle, Jens, Fritz, and I have all told you, in various terms, that you
should never, ever, for any reason at all put a synchronous network
connection on the main thread.
Even if all you are going for is a single ping, it absolutely must be
done using the asynchronous APIs on the main thread, or the synchronous
APIs on a background thread (I suppose the asynchronous APIs could also
be used on a background thread, but that doesn't really buy you anything).
If I were to model an app, and maybe Kyle can jump in here for obvious
reasons, I would pick OmniFocus. It sounds like it has similar broad
behaviors to what you're going for. When I open OmniFocus, here's the
sequence of events:
1) I tap the icon and it briefly shows a non-localized splash screen as
I've been advocating. (No Omni Group logo!)
2) It loads my local data store and quickly shows my
task/project/whatever list.
3) At some point, presumably having detected that there is a network
connection, it initiates a background connection to my WebDAV server and
determines whether there have been any changes on either the client or
server.
4) Only if changes are present, a sync progress indicator is presented
and the sync proceeds asynchronously.
5) While the sync is in progress, I can't edit my existing tasks, but I
can of course quick-add new ones. This is important since OmniFocus
can't know how long the sync might take, and it doesn't want to block my
ability to use the app to the maximum extent possible.
6) If the sync succeeds, I am immediately returned to a table view which
has been reloaded with any synced data. If the sync fails (presumably
by exceeding some timeout threshold), an alert view notifies me of as much.
7) I can continue using the full feature set.
--
Conrad Shultz
Synthetiq Solutions
www.synthetiqsolutions.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden