Slow first MATLAB start
조회 수: 6 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!