Avoid MCR CACHE deletion each time an executable is launched

Hi Everyone,
I have two Matlab scripts (Init.m and Filter.m) compiled using the Matlab application compiler in Windows (Init.exe and Filter.exe are created). I have seen that if I launch the Init.exe, a folder is created in the MCR_CACHE folder containing all the necessary files to run Init.exe. If I launch Init.exe again the time to execute it reduces dramatically since its folder in MCR_CACHE folder has already been created. Now, if I launch the Filter.exe, the folder of the Init.exe in the MCR_CACHE is deleted and a folder for the Filter.exe in the MCR_CACHE is created. How can I avoid the deletion of the Init.exe folder in the MCR_CACHE? This way if I launched Init.exe after having launched the Filter.exe, the Init.exe execution would be much faster.

답변 (1개)

Bruno Luong
Bruno Luong 2020년 12월 4일

0 개 추천

"Now, if I launch the Filter.exe, the folder of the Init.exe in the MCR_CACHE is deleted and a folder for the Filter.exe in the MCR_CACHE is created"
How can you do that? MCR cache are stored by application and they should not delete the others (unless your cach run out of space)
In windows, it locate somewhere here:
C:\Users\XXX\AppData\Local\Temp\XXX\mcrCachea.b\Filter_yyy
C:\Users\XXX\AppData\Local\Temp\XXX\mcrCachea.b\Init_zzz
From my experience, there is no reason they delete each other.

댓글 수: 3

The deletion is an automatic process: as soon as I launch the Filter.exe, the Init folder in the MCR_CACHE is deleted. They are two separated files and I launch them one after the other. When I lauch the second, the Init folder is deleted. How can I avoid that?
I have exactly the same problem. How did you resolve it ?
Bruno Luong
Bruno Luong 2023년 4월 5일
편집: Bruno Luong 2023년 4월 5일
@MetierSI try to move MCR cache root folder to a place where OS does not clean automatically

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

질문:

2020년 12월 4일

편집:

2023년 4월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by