Re: Getting a splash screen to show
Re: Getting a splash screen to show
- Subject: Re: Getting a splash screen to show
- From: Kyle Sluder <email@hidden>
- Date: Tue, 30 Jul 2013 10:05:02 -0700
On Jul 30, 2013, at 9:38 AM, Keith Knauber <email@hidden> wrote:
> 1) A splash screen is a *much faster* alternative than drawing an incomplete main window.
> My splash screen draws in ~30ms.
> My full screen document window draw takes ~200ms, even when empty.
> Why?
> - NSAttributedString takes 2000 CPU instructions per *pixel*.
1. NSAtrributedString drawing time is almost certainly proportional to string length, not number of pixels covered.
2. Unless you're constantly invalidating the window, how often are you actually going to draw the text? Once.
3. If you're concerned about string drawing, then by definition your window isn't empty.
> - It takes longer to _recursiveTickleNeedsDisplay a view hierarchy than it does to draw a splash screen NSImage.
This is a serious allegation, considering drawing a splash screen involves displaying a view hierarchy anyway.
What kind of view hierarchy do you have? How are you measuring this time? Do you frequently override -setNeedsDisplay: or -viewWillDraw?
> For this reason I suppress any document window drawing or other unnecessary NSTimers while loading.
This is, of course, a good idea. Running with the inference that you have an extremely deep view hierarchy, you might benefit further by delaying adding your subviews until your document is done loading.
> If you want to talk about optimizing, why don't you analyze how much _recursiveTickleNeedsDisplay you're doing before your app is ready to draw anything.
I've _never_ seen _recursiveTickleNeedsDisplay show up in a sample.
> Apple has become more focused on its $.99 Mac App Store apps.
> I notice there are very few products in the Mac App store that cost > $99
True, but I happen to work for a company that makes a couple. None of them has or needs a splash screen.
--Kyle Sluder
>
>
>
> On Jul 29, 2013, at 4:08 PM, Keith Knauber <email@hidden<mailto:email@hidden>> wrote:
>
> I can't have my splash screen get stuck on, and obscure anything in case a modal dialog decides to present itself.
>
> The general recommendation is to avoid splash screens altogether. If your app takes long enough to launch that the user would have time to read a splash screen, you're better off putting the effort into profiling and optimizing the startup path so the splash screen isn't necessary.
>
> —Jens
>
> _______________________________________________
>
> 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
_______________________________________________
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