Slow first MATLAB start
7 ビュー (過去 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!