Faster Splash Screen

Just a wild guess: How is the memory load at that time?

That is what happens indeed. The archive containing the fonts is 279.8 MB.

45.1 MB at launch, 39.0 later.

What is evident now is the issue exists only on machines that use hard drives. With an SSD, the app displays almost instantly.

Unfortunately, I cannot count on customers having all the latest Fusion drive.

Do you access all these fonts in your application code by their name in the navigator?

No. All the fonts are stored in a zip file that is unpacked after being moved to SpecialFolder.ApplicationData.

They are activated locally with CTFontManagerRegisterFontsForURL. But that happens in a thread way after the main window opens.

Thanks to your early suggestions, now I have placed splash.show in App.Constructor, and the main window show in App.Activate. I guess I cannot optimize much more.

Splash displays right away on an SSD, and in around 6 seconds on a hard drive. I believe that to be within acceptable limits now.

But then there is no reason at all to have them in the navigator. Delete these links. I’m not totally sure, but I think in the application running you’ll have them twice in memory if you don’t remove them from the navigator.

As I am not having any reference to these resources in code, I doubt they actually take any memory. But indeed I will move them to a copyfile step. That could not hurt.

Another solution is to make your main app the helper app. So the prime app only shows the splash screen and loads the main app.

I tried that already (see above). There is no significant gain.

There is something seriously wrong IMHO.

How long does a simple (Xojo) Hello World app take to launch?
Once you’ve got a base line, add in the same resources as the fonts application and test again.
Turn off GateKeeper and try again

sudo spctl --master-disable

I do wonder if it’s the simple act of validating the code signature (at least ensuring that it’s still intact) which s what’s taking so long.
I have a couple of games on the Mac that gigabytes in file size and they launch fine.

I know you only tested it; but don’t put executable files in the Resources folder. It can cause a App Store Rejection, as their code sign engine does/didn’t handle executables in the Resources folder. The “MacOS” folder and “Helpers” are the best places.

I had a app store rejected for doing just this, even though App Wrapper did it properly and GateKepper accepted it.

I will try that tomorrow. I will also try not dragging the files into the navigator, but copy them with a build step.

About the place where to place a helper, I knew you posted the recommendations somewhere. I will keep that in mind.

Thanks.

It appears you were right. I moved the files from the navigator to a copyfile step, and now the Splash Screen appears approximately 3 seconds after double clicking on the app instead of 5.

Thank you.