How can I speed up GUI startup?
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Christian Brauers
el 23 de Nov. de 2016
Respondida: Walter Roberson
el 12 de Nov. de 2024 a las 4:49
I have installed Matlab R2016b on a new Windows 7 machine. Starting the desktop GUI is painfully slow, taking anywhere from two to almost ten minutes. The -timing flag creates reports similar to the following:
total item gap description
=====================================
0.00 0.00 0.00 MATLAB script
0.04 0.04 0.00 main
0.51 0.42 0.05 LM Startup
0.54 0.00 0.04 splash
1.03 0.17 0.32 InitSunVM
1.33 0.27 0.03 PostVMInit
1.33 0.47 0.32 mljInit
444.71 443.38 0.01 StartDesktop
444.71 443.85 0.32 Java initialization
444.72 0.00 0.01 psParser
444.75 0.03 0.00 cachepath
445.50 0.68 0.07 matlabpath
565.00 120.29 444.71 Init Desktop
569.23 0.00 123.73 SettingsConstruct
569.23 0.00 123.73 SettingsConstructo
569.50 124.75 0.00 matlabrc
=====================================
The startup time can be greatly improved with the nodesktop flag, forgoing the GUI in favor of a simple command window. Suddenly, the timing report looks more like this:
total item gap description
=====================================
0.00 0.00 0.00 MATLAB script
0.11 0.11 0.00 main
0.62 0.46 0.06 LM Startup
0.77 0.01 0.14 splash
1.27 0.17 0.33 InitSunVM
1.58 0.28 0.03 PostVMInit
1.58 0.48 0.33 mljInit
1.60 0.50 0.33 Java initialization
1.62 0.00 0.02 psParser
1.65 0.03 0.00 cachepath
2.48 0.74 0.09 matlabpath
8.43 0.00 5.96 SettingsConstruct
8.43 0.00 5.96 SettingsConstructo
8.72 7.07 0.00 matlabrc
=====================================
Items shown account for 93.7% of total startup time [TIMER: 3 MHz]
Still not perfect, but good enough. Except for the fact that all the convenience features are gone. So, I run the desktop command. The profiler spits out over 100 seconds stuck in the MLDesktop.getInstance.initMainFrame(0, 1); line of the desktop function, the call to that Java method accounting for all the execution time.
How do I speed up the program's startup? Waiting several minutes to get something done is not acceptable.
0 comentarios
Respuestas (2)
Walter Roberson
el 12 de Nov. de 2024 a las 4:49
The single most important speedup you can make for MATLAB startup, is to install MATLAB on a decent SSD (Solid State Drive)
0 comentarios
Udit06
el 12 de Nov. de 2024 a las 3:31
You can refer to the following MATLAB answer that provides detailed solution for issues related to slow startup:
0 comentarios
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!