Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase the startup speed of the delphi app?

What do you do to increase startup speed (or to decrease startup time) of your Delphi app?

Other than application specific, is there a standard trick that always works?

Note: I'm not talking about fast algorithms or the likes. Only the performance increase at startup, in terms of speed.

like image 859
Olaf Avatar asked Jul 12 '09 06:07

Olaf


2 Answers

In the project options, don't auto-create all of your forms up front. Create and free them as needed.

like image 54
Bruce McGee Avatar answered Nov 03 '22 00:11

Bruce McGee


Try doing as little as possible in your main form's OnCreate event. Rather move some initialization to a different method and do it once the form is shown to the user. An indicator that the app is busy with a busy mouse cursor goes a long way.

Experiments done shows that if you take the exact same application and simply add a startup notification to it, users actually perceive that app as starting up faster!

Other than that you can do the usual things like exclude debug information and enable optimization in the compiler.

On top of that, don't auto create all your forms. Create them dynamically as you need them.

like image 38
Maltrap Avatar answered Nov 03 '22 01:11

Maltrap