Closed AnasAGSO closed 1 year ago
Hi @AnasAGSO
It is possible that you are right. MATLAB is a dynamically compiled language, and it may take longer for it to compile and run code for the first time, caching parts of the previous compilation (internally) for use in subsequent runs.
Unfortunately, there isn't a workflow which will allow you to save these cached artifacts for use in a different session of MATLAB.
Are you able to reproduce this behavior outside of the Docker Image?
I'm guessing you would be, and helping you improve performance with this situation is out of the scope of this forum.
I'd recommend reaching out to MathWorks Technical Support for an in-depth investigation. They may be able to better assist you with tips and tricks to improve performance.
PS: I was able to source this link which has some content which may be relevant to you.
Question/what I want:
is there a caching system that is used by Matlab, if yes how can i export it to be able to reuse it?
The problem:
How to reproduce:
Used toolboxes: MATLAB, Simulink, Simulink_Test, Image_Processing_Toolbox, Computer_Vision_Toolbox, Automated_Driving_Toolbox, Control_System_Toolbox and Model_Predictive_Control_Toolbox
Test model: https://de.mathworks.com/help/driving/ug/automate-testing-for-scenario-variants-of-aeb-system.html
Reproducing process:
In an interactive MATLAB session execute :
openExample('autonomous_control/AutomateTestingForScenarioVariantsOfAEBSystemExample')
Upload the content of the folder AutomateTestingForScenarioVariantsOfAEBSystemExample to a git repository
In the container git clone, enter your folder and execute:
matlab -batch "addpath(genpath(cd)); testFile = sltest.testmanager.load('AutonomousEmergencyBrakingTests.mldatx');testSuite = getTestSuiteByName(testFile,'Test Scenarios');testCase = getTestCaseByName(testSuite,'scenario_25_AEB_PedestrianTurning_Nearside_10kph');resultObj = run(testCase);sltest.testmanager.report(resultObj,'Report.pdf', Title='Autonomous Emergency Braking', IncludeMATLABFigures=true, IncludeErrorMessages=true, IncludeTestResults=0, LaunchReport=false);exit;"
After 13-15min scenario execution will finish, save the container as a new one
Launch the newly created container
Git clone somewhere else and rerun the test and it will take 13-15min