MATLAB executable too slow

41 vues (au cours des 30 derniers jours)
ab
ab le 12 Avr 2013
Commenté : Jan le 17 Oct 2018
I converted my matlab program into Console based application using the deploytool in matlab. The matlab .m file takes around 2 seconds to execute but after I converted it into an executable form and called the .exe it takes 45 secs to execute which is too much. I want to integrate the matlab program with php. Is there any other efficient and fast way to do this? In my project, time is really a big factor(not the developing time but the execution time of the application) so any method that takes less time? I saw in the internet that we can write php extensions to call the matlab is this method fast or the same as calling the .exe file? Is matlab coder any help for this process? If there is any alternative options please mention it.
  2 commentaires
Abdurrehman
Abdurrehman le 15 Fév 2018
Hi, did you get solution to this issue? My standalone also takes long time to load though I am using a splash screen but it's still creating issuses.
Walter Roberson
Walter Roberson le 15 Fév 2018
In some circumstances, MATLAB Production Server is a good solution to slow startup.

Connectez-vous pour commenter.

Réponses (5)

Walter Roberson
Walter Roberson le 12 Avr 2013
Start-up times for the executables will be slow, as it will go through the equivalent of starting up MATLAB itself.
This does not apply for MATLAB Coder, which generates C or C++ directly. However, there are quite a few things that are not supported in MATLAB Coder.

Peter
Peter le 13 Août 2014
If you are using deploytool to compile your code, under Project - Settings-Toolboxes on path uncheck any toolboxes that aren't needed by your executable. I recently had this issue and the above steps cut the executable file size in half and significantly reduced the start time of the executable.
  2 commentaires
sandeep singh
sandeep singh le 17 Oct 2018
I am not able to find Project - Settings-Toolboxes on path
Jan
Jan le 17 Oct 2018
"on path" might be misleading. Do you find the GUI for the Settings, where you can define which toolboxes to include?

Connectez-vous pour commenter.


ab
ab le 15 Avr 2013
What kind of things are not supported in MATLAB coder? So it means that I have to convert my whole matlab program into C or C++ to make the execution time fast? Do you know how can I integrate it with php after conversion?
  2 commentaires
Bill Chou
Bill Chou le 17 Avr 2013
FYI, an updated list for functions and System objects supported by MATLAB Coder:

Connectez-vous pour commenter.


ab
ab le 16 Avr 2013
Modifié(e) : ab le 16 Avr 2013
I think the MATLAB coder won't work for my program.Is there any other alternatives?Can I call my maltab program from C will this increase my execution time or its the same?Because the .exe console based application generated from matlab is taking very long the execution time of the program is the same so I guess it takes too long to call the exe load the MCR.Is there any solution for this or any alternatives?I have read through many post and blogs which defines the reason that are slow but cannot give the answer on how to solve it.So any solution will be highly appreciated. Will generating a C shared library help in this problem?? I am totally confused
  1 commentaire
Walter Roberson
Walter Roberson le 16 Avr 2013
The engine open will take that time.
Consider using MATLAB's "automation" mode. This calls upon MATLAB using COM. This requires that the operating system be MS Windows, and requires a real MATLAB installation; and if the web server will be accessible to the public it requires a higher license grade than normal.

Connectez-vous pour commenter.


Jason Ross
Jason Ross le 17 Avr 2013
You might want to take a look at MATLAB Production Server, as well.

Catégories

En savoir plus sur MATLAB Coder dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by