Slow first MATLAB start
8 views (last 30 days)
Show older comments
While creating Azure Windows image for MATLABs we noticed it works very slow during the first call.
To make it work faster we added the execution of the code below before packer created image:
$matlabCommand = "-batch `"version, ver -support, pause(10), exit`""
$matlab_dirs = Get-ChildItem -Path "C:\Program Files\MATLAB\R*" # find all matlab versions
foreach ($matlab_dir in $matlab_dirs) {
$matlabPath = "$matlab_dir\bin\matlab.exe" # This is where the executable is
if (Test-Path $matlabPath) {
Write-Host "Initializing $matlab_dir"
cmd /c "`"$matlabPath`" $matlabCommand"
}
MATLAB started to work faster but still slow comparing to the second run on the same Azure machine.
What could be done to make it work faster?
we use MATLAB installer so MATLAB Startup Accelerator task is present on the machine.
P.S. we spin up the Azure machine only for 1 build so we are looking for any solution which could be adopted by packer.
0 Comments
Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!