Hello,
I'm new in matlab and also in programming. I have got an assignment from my internship to speed up an exe form of the matlab GUI. The GUI has lots of sub-folder and .m files. Currently it's fast when I run it with matlab, but if I change it to exe with matlab compiler it takes eternity to run. I have seen some solution on the internet to use "MCR_CACHE_ROOT", but no one from university or work knows about it. I have no idea, what it is and how to even start with it. Can anyone please explain it to me like I'm a 5 years old? I would be really grateful.
Thanks

6 Kommentare

Jan
Jan am 19 Aug. 2021
What exactly is "an exe form of the matlab GUI"? What does it mean, that a "GUI has subfolders"? GUIs are the windows on the screen an subfolders are nestes folders on the file system. Please explain, what "takes eternity to run" exactly means. Using the unit seconds is much better that emotional expressions.
As long as it is not clear, where the time is spent, the chances for a matching guess, which solves the problem, are very small.
Mubin R
Mubin R am 19 Aug. 2021
After I convert the main file(mlapp) and the m files as executable file using compiler, it takes nearly 10-20 minutes for the GUI to start, and response time of each button click is half to one minute or even more. If I run the mlapp file from matlab, the loading time of GUI is less than a minute and button click response time is only few seconds.
Jan
Jan am 19 Aug. 2021
Bearbeitet: Jan am 21 Aug. 2021
Okay, now the problem is clear. Which Matlab version and OS are you using? See:
Mubin R
Mubin R am 19 Aug. 2021
I'm using R2020b. Now the problem I'm having is
" export MCR_CACHE_ROOT=/tmp/mcr_cache_root_$USER # local to host
mkdir -p @MCR_CACHE_ROOT "
I couldn't find a better explanation for this procedure. I know only what is does, but I don't know how to apply this and where to start.
Jan
Jan am 21 Aug. 2021
@Mubin R: I do not understand the meaning of your comment.
The code in your comment must be executed in a Linux shell. Are you working with Linux?
Mubin R
Mubin R am 8 Sep. 2021
Sorry, I sent you the wrong one. I wanted to post this one
REM set MCR_CACHE_ROOT=%TEMP%
set MCR_CACHE_ROOT="C:\Documents and Settings\Yair\Matlab Cache\"
myExecutable.exe
I figured it out how to use it, but it didn't make the GUI that fast

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2020b

Gefragt:

am 18 Aug. 2021

Kommentiert:

am 8 Sep. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by