MATLAB app designer : .exe file extremly slow when opening and calculating

23 visualizaciones (últimos 30 días)
  • MATLAB 2019B
  • dell presicion laptop
  • 5000 lines code
I am building a software, so I use appdesigner to generate an EXE file.
However, the EXE file will cost 40~50 seconds to open.
And when calculating, it's very slow. For example, without the interface (only code), one time running will cost ~1 minute, but when use appdesigner, the same code will cost almost 15 minutes. It makes me feel hopeless .
What can I do to make the generated software run more smoothly?
  2 comentarios
Nicolas B.
Nicolas B. el 28 de Nov. de 2019
So, for the 40-50 s to open, that's totally normal. The exe starts first the runtime and then starts to run. If you have to start toolboxes (e.g. Parallel Computing), than it takes an extra few seconds. That's the price to pay to run MATLAB software without MATLAB.
Than, for the computation time, could you share what you are doing? My experience is that the "printing part" (e.g. plotting) takes longer in exe-files than in the regular MATLAB:
Heran Wang
Heran Wang el 29 de Nov. de 2019
Thank you very much for your explanation. I agree.
My calculation process is roughly as follows:
  • Multiple for loops are used
  • The image processing toolbox was used in the innermost layer
  • The progress bar is updated after each loop
  • At the end of all loops, a 3D drawing is displayed on the interface
I don't know if the root progress bar is involved, or if the toolbox is involved.
Your answer has largely solved my doubts. Thanks again!

Iniciar sesión para comentar.

Respuestas (1)

Ajay Kumar
Ajay Kumar el 2 de Dic. de 2019
I would suggest you to break the 5000 lines of code in app designer code view to multiple function files (.m) files.
As executing functions are more efficient.
Also consider vectorization if possible/ if you have some cases in your program.

Categorías

Más información sobre Application Deployment en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by